Let me dive into the problem directly:
There is an ASP.NET Submit Form (In this example just a mock one). I am going to lock the Page Web Controls and display some animated progress bar as soon as the user hits the "Submit" Button. I have tried the following code snippet but the page controls are not lock! And I need t handle it.
Here is the 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 The 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 and the image displays. But, the text boxes are not locked so that the user may change the their values which must not happened.
So does anyone have any idea to handle this matter?
Thank you so much,