title: Textbox loses its value on button Click
body: <p>I have a texbox which is read only. The value comes from another textbox. But when I click on the submit button, the value of textbox goes blank. </p>
  
  <p>Please see the code of textbox:</p>
  
  <pre><code>&lt;asp:TextBox ID="txtTotalAmt" runat="server" class="txtfld-popup2" MaxLength="5"  ReadOnly="true" EnableViewState= "false"&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>Also please see the code of page load and button click:</p>
  
  <pre><code> protected void btnSubmit_Click(object sender, EventArgs e)
  {
      if (radiobtnIsCustomer.Checked &amp;&amp; txt_custId.Text == string.Empty)
      {
          div_errorMsg.InnerText = "Please enter your Customer Id.";
          return;
      }
      if (Page.IsValid)
      {
          SendMail();
          Response.Redirect("ThankYou_AgriBusiness.html"); 
      }
      if (!CaptchaControl1.IsValid)
      {
          lblCaptchaError.Text = "Invalid Captcha";
      }
      Customer newCustomer = new Customer();
      newCustomer.IsExistingCustomer = radiobtnIsCustomer.Checked;
      newCustomer.ExistingCustomerId = txt_custId.Text;
  }
  </code></pre>
  
  <p>Code for Page load:</p>
  
  <pre><code> protected void Page_Load(object sender, EventArgs e)
  {
      lblCaptchaError.Text = "";
      div_errorMsg.InnerText = "";
      if (!IsPostBack)
      {
          txtTotalAmt.Attributes.Add("readonly", "readonly");
          conn.Open();
          SqlCommand cmd = new SqlCommand("select * from States_agri", conn);
          SqlDataReader dr = cmd.ExecuteReader();
          ddl_state.DataSource = dr;
          ddl_state.Items.Clear();
          ddl_state.DataTextField = "StateName";
          ddl_state.DataValueField = "StateID";
          ddl_state.DataBind();
          ddl_state.Items.Insert(0, new ListItem("--Select State--", "0"));
          conn.Close();
  
          Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
          rm = new ResourceManager("Resources.Strings", System.Reflection.Assembly.Load("App_GlobalResources"));
          ci = Thread.CurrentThread.CurrentCulture;
          LoadString(ci); 
      }
  }
  </code></pre>