期间的UpdateProgress的UpdatePanel隐藏 [英] Hide UpdatePanel during UpdateProgress

查看:143
本文介绍了期间的UpdateProgress的UpdatePanel隐藏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找最简单的方式来隐藏的UpdatePanel在等待提交响应回来。
东西<一个href=\"http://stackoverflow.com/questions/841061/how-can-the-updatepanels-contenttemplate-be-hidden-while-an-updateprogress-is-be\">like这里描述 - 使用Ajax控件工具包和UpdatePanelAnimationExtender既矫枉过正,造成一些问题,即:

I'm looking for the easiest possible way to hide an UpdatePanel while waiting for the submit response to come back. Stuff like described here - using Ajax Control Toolkit and the UpdatePanelAnimationExtender is both overkill and causing some issues, namely:


  • 因为有几个隐藏的面板在页面它变得乱七八糟并隐藏了错误的面板。我不知道为什么会这样;

  • 我无法找到一个方法来指定只有一个按钮应该触发动画。我的确在UpdatePanel中指定,但似乎被忽略,所有的面板内的控制触发动画。

一个简单的JavaScript解决方案将是理想的。这里的问题是ASP.NET喜欢以产生用于在运行时控制怪异的ID。对于任何解决方案?

A simple javascript solution would be ideal. The problem here is ASP.NET likes to generate weird IDs for the controls at runtime. Any solutions for that?

先谢谢了。

推荐答案

我会建议使用jQuery。它将使你的东西更容易。因此,要获得围绕奇怪的ID的问题,你可以做一些jQuery是这样的:

I would suggest using jQuery. It will make things easier for you. So to get around the "weird ID" issue you could do some jQuery like this:

$('#<%= someASPControl.ClientID %>').hide();

和显示

$('#<%= someASPControl.ClientID %>').show();

这是使用jQuery抢由ID的元素,然后你可以做你想做的事情是什么。诀窍是.ClientID,将抓住这.NET发出的ID。

This is using jQuery to grab a element by id and then you can do what you want with it. The trick is the ".ClientID" that will grab the id that .net sends out.

这篇关于期间的UpdateProgress的UpdatePanel隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆