You can specify two attribute to identify any of the HTML controls
either "id" or "name"
for example
<input type="text" id="txtAddress" name="txtAddress1" />
If you want to find this text box using id, you can use document.getElementById('txtAddress") and if you want to find this text box using its name you can use document.getElementByName("txtAddress1");
It is not necessary to specify same id and name attribute of the html element. Older version of IE was not capable of identifying the id property, it used to find the element only with its name.
Now, if you specify the Id property its enough to work in the client side however to access an html element at the server side you will have to specify its name. For example, above article can be accessed in the server side by using
Request.Form["txtAddress1"].
Hope this helps.
Thanks for asking and happy learning.
Best regards,
Webmaster
http://www.dotnetfunda.com
Asrinu, if this helps please login to Mark As Answer. | Alert Moderator