如何在AJAX Update进程中调用JAvascript函数 [英] How do I call JAvascript function inside AJAX Update progress

查看:66
本文介绍了如何在AJAX Update进程中调用JAvascript函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨亲爱的所有



有谁能告诉我如何在aspx页面的asp updateprogress控件中调用和运行javascript / jquery函数。



我有一个带有文字用你的证书更新!的asp标签。在aspx页面和UpdateProgress上添加消息Please Wait ...。

如果在aspx页面上启用了更新进度,我必须清除标签上的文本。

如果有人对此有所了解,请帮助我。



已添加代码:


Hi Dear All

Could anyone please tell me how to call and run a javascript/jquery function inside an asp updateprogress control in aspx page.

I have an asp Label with text "Updating with Your Credentials!" on the aspx page and an UpdateProgress with message "Please Wait...".
When ever the update progress is enabled on the aspx page I have to clear the text on the label.
kindly help me if anyone has idea about this.

Added Code:

<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<div class="labl_centls"><br />
<asp:Label ID="lblResult" runat="server" Text="Updating with Your Credentials!" >
</div>
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<img src="Images/ajax-loaderr.gif" alt="uploading..." /> <br/>
Please Wait...
</ProgressTemplate>

<div style="width: 100%; height: 400px; overflow:scroll;">
<asp:GridView ID="gvSearchData" runat="server" HeaderStyle-CssClass="top_rd_hd" CellPadding="0" CellSpacing="0"

AutoGenerateColumns="false" onrowcancelingedit="gvSearchData_RowCancelingEdit"

onrowdeleting="gvSearchData_RowDeleting" onrowediting="gvSearchData_RowEditing"

onrowupdating="gvSearchData_RowUpdating" >

<asp:TemplateField HeaderText="S.No.">
<%#Container.DataItemIndex+1 %>

<asp:TemplateField ItemStyle-Width="0.1%" >

<asp:Label ID="lblId" runat="server" Text='<%#Eval("id")%>' Visible="false">


<asp:TemplateField HeaderText="COLUMN1">

<asp:Label ID="lblCol1" runat="server" Text='<%#Eval("column1")%>'>


<asp:TemplateField HeaderText="COLUMN2">

<asp:Label ID="lblCol2" runat="server" Text='<%#Eval("column2")%>'>


<asp:TemplateField HeaderText="EXISTANCE">

<asp:Label ID="lblExistnc" runat="server" Text='<%#Eval("existance")%>' >


<asp:TemplateField HeaderText="MODIFIER">

<asp:TextBox ID="txtModifier" runat="server" Text='<%#Eval("modifier")%>'>


<asp:Label ID="lblModifier" runat="server" Text='<%#Eval("modifier")%>'>


<asp:TemplateField HeaderText="EFFECTIVE DATE">

<asp:Label ID="lblEfDate" runat="server" Text='<%#Eval("effectivedate")%>' >


<asp:CommandField ShowEditButton ="true" HeaderText="EDIT"/>
<asp:CommandField ShowDeleteButton="true" HeaderText="DELETE"/>
</div>



Sir My Requirement当更新进度显示Please Wait ...时应该清除asp Label lblResult上的文本。

如果你对此有所了解,请给我一个解决方案。


Sir My Requirement is When ever the update progress shows "Please Wait..." then the text on the asp Label lblResult should be cleared.
Kindly give me a solution if you have idea about this.

推荐答案

For that Just Drag Drop your Update Progress Control and write following code




                <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                    <ProgressTemplate>
                        <div id="Progress">Please wait ......</div>
                       <div id="bgDiv"></div>
                    </ProgressTemplate>
                </asp:UpdateProgress>

Define the following style on head section



<style>
    #bgDiv {
      position:absolute;
      top:0px;
      bottom:0px;
      left:0px;
      right:0px;
      overflow:hidden;
      padding:0;
      margin:0;
      background-color:black;
      filter:alpha(opacity=50);
      opacity:0.5;
      z-index:500;
    }
    #Progress
    {
        position: absolute;
        background-color:Red;
        width: 300px;
        z-index: 600;
    }


使用此链接: http://codeverge.com/asp.net.ajax-ui/how-to-hide-control-when-the-asp .net-ajax-pro / 236621 [ ^ ]


这篇关于如何在AJAX Update进程中调用JAvascript函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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