c# - Lock ASP.NET Control While Processing User Request -


let me dive problem directly:

there asp.net submit form (in example mock one). going lock page web controls , display animated progress bar user hits "submit" button. have tried following code snippet but page controls not lock! , need t handle it.

here markup:

 <form id="form1" runat="server">     <asp:scriptmanager runat="server" id="smgr" enablepartialrendering="true"></asp:scriptmanager>     <div>         <asp:updateprogress runat="server" id="progressdisplay" associatedupdatepanelid="updatepanelform">             <progresstemplate>                 <img src="images/25-1.gif" />             </progresstemplate>         </asp:updateprogress>         <asp:updatepanel runat="server" id="updatepanelform">             <contenttemplate>                 <asp:textbox runat="server" id="txtname"></asp:textbox>                 <br />                 <asp:textbox runat="server" id="txtlname"></asp:textbox>                 <br />                 <asp:button runat="server" id="btnsubmit" text="submit form" onclick="btnsubmit_click" />             </contenttemplate>         </asp:updatepanel>     </div> </form> 

and code behind:

 protected void btnsubmit_click(object sender, eventargs e)     {         response.write(string.format("you have wrote: {0} {1} {2}", txtname.text, " ", txtlname.text));     } 

it works fine , image displays. but, text boxes not locked user may change values must not happened.

so have idea handle matter?

thank much,

make div , place controls in div. when need, make div enable or disable. don't forget mention runat=server , name of div


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -