Get value asp:Textbox value using javascript

Here are a few ways to get the value of an asp textbox

  1. document.getElementById(‘<%=Test.ClientID%>’).value
  2. <%=txtMyTextBox.ClientID%>
  3. Response.Redirect(“Form2.aspx?name=” + txtName.Text + “&num=” + txtStNum.Text );

Author: Travis Gneiting

Passionate Professional .NET Developer