What is the difference between similar HTML controls and Web controls - like Button and Label, etc.? Why would one need both an HTML Button and a Web Button? How do you decide which one to use?
The HTML controls don't support server-side code. They are simply html like a normal web page.
Web Controls have properties that you can set in your server side code as well as other abilities dependent on the control itself.
Web Controls are not html to begin with but write out the appropriate html depending on what properties are set for them. That'l do donkey, that'l do
Mark
If you are unsure of forum etiquette check here faq796-2540
These controls can also be controlled server side. The main difference is that they are simpler, that they support the same properties server side as they do client side (eg for an input element, it is the value property for a HTML server control, whereas with a text box web control, it is the text property).
The reason they are there is sort of to provide people familiar with HTML ground they are comfortable with. Also, if you use them, you can be sure of what they will be rendered in the browser as (which makes client side scripting for them easier).
But to be honest, if you don't have any real reason to use the HTML server controls, the web controls are much nicer to work with. They expose standard properies (like .text), for starters. If you are new to web development, use the web controls, but be aware that the HTML controls are there if you need them. Mark
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.