I’m sure there are reasons against it but I have come to prefer to use HTML controls over ASP.Net when possible. The reason is that I can perform standard Javascript functions on the control on the markup side without having to do all the Add.Attribute coding on the backend BUT I can still call the control from the code-behind.
To be able to call the control and do other code-behind work on this HTML control, I simply have to add this to the control of my markup: runat=”server”. For example, if I wanted to create an HTML textbox in my asp markup page but also wanted to be able to work with it in code-behind, I simply drag the HTML control to the canvas and then add the runat server in it’s tag like so:
Then in your code behind you simply reference the control as such:
address1.Value = “whatever value I want it to equal”
it works great for me….
**BTW – I did find this useful table that you may need (although you shouldn’t need it with the above example). If you want to be able to declare an HTML control in your code behind, the following table tells you what .Net calls them.
toddvance.com = a great repository of snippets and code examples for .Net, JQuery, PHP, and more!
Random Quote
Religion is the only solid basis of good morals; therefore education should teach the precepts of religion and the duties of man towards God. — Gouverneur Morris