title: Lock ASP.NET Control While Processing User Request
body: <p>Let me dive into the problem directly:</p>
  
  <p>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 <strong>but the page controls are not lock!</strong> And I need t handle it.</p>
  
  <p>Here is the Markup:</p>
  
  <pre><code> &lt;form id="form1" runat="server"&gt;
      &lt;asp:ScriptManager runat="server" ID="smgr" EnablePartialRendering="True"&gt;&lt;/asp:ScriptManager&gt;
      &lt;div&gt;
          &lt;asp:UpdateProgress runat="server" ID="ProgressDisplay" AssociatedUpdatePanelID="UpdatePanelForm"&gt;
              &lt;ProgressTemplate&gt;
                  &lt;img src="Images/25-1.gif" /&gt;
              &lt;/ProgressTemplate&gt;
          &lt;/asp:UpdateProgress&gt;
          &lt;asp:UpdatePanel runat="server" ID="UpdatePanelForm"&gt;
              &lt;ContentTemplate&gt;
                  &lt;asp:TextBox runat="server" ID="txtName"&gt;&lt;/asp:TextBox&gt;
                  &lt;br /&gt;
                  &lt;asp:TextBox runat="server" ID="txtLName"&gt;&lt;/asp:TextBox&gt;
                  &lt;br /&gt;
                  &lt;asp:Button runat="server" ID="btnSubmit" Text="Submit Form" OnClick="btnSubmit_Click" /&gt;
              &lt;/ContentTemplate&gt;
          &lt;/asp:UpdatePanel&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And The Code Behind:</p>
  
  <pre><code> protected void btnSubmit_Click(object sender, EventArgs e)
      {
          Response.Write(string.Format("You have wrote: {0} {1} {2}", txtName.Text, " ", txtLName.Text));
      }
  </code></pre>
  
  <p>It works fine and the image displays. <strong>But, the text boxes are not locked so that the user may change the their values which must not happened.</strong></p>
  
  <p>So does anyone have any idea to handle this matter?</p>
  
  <p>Thank you so much,</p>