title: ASP.NET/HTML input button value on postback
body: <p>According to the info in:</p>
  
  <p><a href="https://stackoverflow.com/questions/669797/which-values-browser-collects-as-a-postback-data">Which values browser collects as a postback data?</a></p>
  
  <p>the value of the HTML input button is sent in a post back. I'm testing in ASP.NET with IE and I am not finding this to be the case.</p>
  
  <p>The markup for my test case is:</p>
  
  <pre><code>&lt;%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="Test" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;test postback&lt;/title&gt;
      &lt;script type="text/javascript"&gt;
      function doTest() {
          var button = document.getElementById("btnTest");
          button.value = "new-value";
          alert("button contents = " + button.value);
          return true;
      }
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="myForm" runat="server"&gt;
      &lt;div&gt;
          &lt;asp:Panel ID="pnlTest" runat="server"
              DefaultButton="btnTest"&gt;
              Textbox: 
              &lt;asp:TextBox ID="txtTest" runat="server" /&gt;
              &lt;asp:Button ID="btnTest" runat="server" 
                  Text="change" OnClientClick="doTest()" /&gt;
          &lt;/asp:Panel&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>The code behind is:</p>
  
  <pre><code>Partial Class Test
      Inherits System.Web.UI.Page
  
      Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  
          txtTest.Text = btnTest.Text
      End Sub
  End Class
  </code></pre>
  
  <p>My result is that the value of the input button is always "change" when the browser loads the page, but I was expecting it to be "new-value" after postback. The Javascript doTest() function is changing the value when the button is clicked.</p>
  
  <p>Is there something more I'm supposed to do for ASP.NET or IE to get the input button value posted back? Or is the information about this functionality
   wrong?</p>