title: How to get HiddenField value in asp.net code-behind
body: <p>How to get HiddenField value in asp.net code-behind？ Thanks in advance!</p>
  
  <pre><code>  public partial class ReadCard : System.Web.UI.Page
      {
          protected void Page_Load(object sender, EventArgs e)
          {
              Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
  
          }
  
          protected void Button1_Click(object sender, EventArgs e)
          {
              this.ClientScript.RegisterStartupScript(this.GetType(), "MyClick ", "&lt;script&gt;ReadCard();&lt;/script&gt; ");
              string b= HiddenField1.Value; //How to get the value "123"??
          }
      }
  </code></pre>
  
  <p>aspx:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;meta http-equiv="expires" content="0"/&gt;
      &lt;meta http-equiv="cache-control" content="no-cache"/&gt;
      &lt;meta http-equiv="pragma" content="no-cache"/&gt;
      &lt;script src="jquery-1.5.2.min.js" type="text/javascript"&gt;&lt;/script&gt;
           &lt;script type="text/javascript"&gt;
               function ReadCard() {
                   $("#HiddenField1").val("123");
               }
          &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;asp:HiddenField ID="HiddenField1" runat="server" /&gt;
      &lt;asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>