The two methods that achieve this affect are:
An example of finding an element by ID and assigning a value to the element. When the button is clicked, it calls the show method which finds the ID of the test box. Once the element has been captured, it can be further manipulated. In this case, the textbox will be made to have the value of “Joe”.
<form id=”form1″ runat=”server”>
<asp:TextBox ID=”TextBox1″ runat=”server”></asp:TextBox>
<input id=”Button1″ type=”button” value=”button” onclick=”show()”/>
The getElementByName() method functions in a similar fashion, but instead of grabbing the ID of an element, it will grab the name attribute. Similar to the item below.
<input name=”NameBox” type=”text” />