Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
3.89/5 (2 votes)
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.NET
<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 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.
Posted
Updated 20-May-14 20:50pm
v3
Comments
Sunasara Imdadhusen 21-May-14 2:03am    
You can do via server side as well. Can you please provide code snippet for the same
Sunasara Imdadhusen 21-May-14 2:51am    
do not post your code inside the comment box. please use Improve Question link

XML
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;
    }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900