Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML server controls vs. Web server controls

Status
Not open for further replies.

RebLazer

Programmer
Jun 7, 2002
438
US
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?

Thanks,
Lazer [pipe]
 
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
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Zarcom, he said HTML Server controls

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 [openup]
 
Mark: Picky picky

your welcome Lazer That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top