且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ASP Net Ajax加载指示器

更新时间:2023-12-05 16:45:04

您好,rohit,

您能否尝试以下解决方案,我认为这是您所需要的.
添加Div元素以进行Ajax加载程序图像处理.

Hi rohit,

Could you try the following solution, i think this is what you need.
Add Div element for Ajax loader image processing.

<div id="ajax_loader">
            <img  src='@Url.Content("~/Areas/images/mozilla_blu.gif")' style="padding-left:40px;" alt='' /></div>



为Ajax加载程序中的隐藏和显示"添加javascript方法.



Add javascript methods for Hide and Show in Ajax loader.

function UpdateShowPanel(UpdateMessage) {


( " ).show(); } 函数 UpdateHidePanel(){
("#ajax_loader").show(); } function UpdateHidePanel() {


(" #ajax_loader").hide(); }
("#ajax_loader").hide(); }



然后在要显示或隐藏的地方调用此方法.如果您使用的是更新"面板
只需调用UpdateShow方法即可.



Then Call this method where you want to show or hide. if in case you are using Update panel
just call the UpdateShow method only.