There are many conditions that you may face in which you want to show progress bar with complete postback.This can be achieved very simply just by adding one line javascript function in aspx page :)))
Function :
function ShowProgress() {
document.getElementById('<% Response.Write(UpdateProgress1.ClientID); %>').style.display = "inline";
}
Use Trigger for full postback
<Triggers>
<asp:PostBackTrigger ControlID="btnuploadoffline" />
<asp:PostBackTrigger ControlID="btnexporttoexcel" />
<asp:PostBackTrigger ControlID="btnsave" />
</Triggers>
and call that function on button on which there is full post back
<asp:Button ID="btnuploadoffline" runat="server" Text="Upload" CssClass="button"
OnClick="btnuploadoffline_Click" ValidationGroup="upload" OnClientClick="ShowProgress();" />
Function :
function ShowProgress() {
document.getElementById('<% Response.Write(UpdateProgress1.ClientID); %>').style.display = "inline";
}
Use Trigger for full postback
<Triggers>
<asp:PostBackTrigger ControlID="btnuploadoffline" />
<asp:PostBackTrigger ControlID="btnexporttoexcel" />
<asp:PostBackTrigger ControlID="btnsave" />
</Triggers>
and call that function on button on which there is full post back
<asp:Button ID="btnuploadoffline" runat="server" Text="Upload" CssClass="button"
OnClick="btnuploadoffline_Click" ValidationGroup="upload" OnClientClick="ShowProgress();" />
Comments
Post a Comment