Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

I have a form in that after clicking the submit button i want show the please wait page can any one help me with an example.



Regards,
Rahul
Posted

 
Share this answer
 
v2
Hi, To show “Please wait” text on button click, you can use AJAX UpdateProgress control. The code is given below.
XML
<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>
<asp:UpdateProgress ID="UpdateProgress1" DisplayAfter="10" runat="server" AssociatedUpdatePanelID="upTest">
<ProgressTemplate>
     <div class="divWaiting">
         <asp:Label ID="lblWait" CssClass="waitText" runat="server" Text=" Please wait..."></asp:Label></div>
 </ProgressTemplate>
</asp:UpdateProgress>

Place the asp.net button in update panel and set the attributes of update panel as given below.
XML
<asp:UpdatePanel ID="upTest" ChildrenAsTriggers="true" UpdateMode="Conditional" runat="server">
    <ContentTemplate>
         <asp:Button ID="btnSubmit" Text="Submit" OnClick="btnSubmit_Click" runat="server" />
     </ContentTemplate>
</asp:UpdatePanel>

To add on to this, you can add the below css in <head></head> of your page for making the background inactive while “Please wait” is shown.
XML
<head><style type="text/css">
.divWaiting
{
   position: absolute; background-color: #FAFAFA; z-index: 2147483647 !important; opacity: 0.8;
   overflow: hidden; text-align: center; top: 0; left: 0; height: 100%;  width: 100%;      }
.waitText
 {
    position: relative; top: 45%; color: Black; font-size: 26px;
    font-weight: bold; background-color: #FAFAFA;   }
</style></head>

To download Ajax Control Toolkit and know how to add the Ajax Control Toolkit to the Visual Studio Toolbox, please visit http://www.asp.net/ajaxlibrary/act.ashx
 
Share this answer
 
v2
Comments
naveen pallela 10-Oct-13 5:57am    
Thnk u
Refer this link

jQuery BlockUI Plugin[^]

Regards..
 
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