First some terminology:
In ASP.NET, any tag with the runat=server attribute is a control, also called a server control.
You can also dynamically add controls, and even static html becomes a control when parsed.
You are specifically asking about the difference between the HtmlControls and WebControls,
which are 2 namespaces provided by the framework that have very similar controls in them.
They are all server controls by definition, and they are all controls used on web forms also.
HtmlControls are designed to be identical to basic html tags in all features and functionality.
Declaring an html tag as runat=server simply allows you to programatically access its value,
and to take advantage of things like the new postback events and viewstate found in .NET.
You will not see any changes in the somewhat odd naming conventions used with html tags,
nor will you see advanced properties for colors, fonts, borders, and other style attributes.
Thus, these are designed to be used just like standard html tags, with programmatic access.
WebControls are designed to be more like windows controls, instead of just standard html.
They usually have much richer visual properties, like the colors, fonts, borders, and others.
They also offer a more standard object model, so you can be sure text is always called text.
In some cases they also are quite complex, like the grid, calendar, and validation controls.
They end up being rendered as html also, but with a lot of automatic styles and javascript.
Some of the basic input controls differ only in the richer feature set and new object model.
All controls, regardless of type, go through the exact same server events and processing.
There is always a minimal performance hit when using any control, as opposed to just html,
but HtmlControls vs. WebControls are nearly the same, so this is not really an issue here.
The issue is always do you need a control at all, i.e. are you going to do any programmatic
access of the control or otherwise take advantage of postback events, viewstate, validation.
If you need these features, then be assured that they still run faster than classic ASP did.
Your choice between HtmlControls and WebControls should therefore come down to style.
Are you an html coder, possibly writing your own code stylesheets for any rich interface?
Are you needing to finely control all the html that is rendered, for cross-browser issues?
If you answered yes to one of these questions then you mostly need to use HtmlControls.
Are you wanting to do quick VB-like drag-n-drop of rich controls with lots of properties?
Are you needing to build an intranet app or prototype where exact html doesn't matter?
If you answered yes to one of these questions then you mostly need to use WebControls.
Keep in mind that sometimes you don't have such an easy choice if you use HtmlControls.
I prefer HtmlControls mostly, but if I need to do validation then I mostly use WebControls,
unless I have a client that insists on client javascript that supports Netscape as well as IE.
Also, you don't have anything compex, like grids and calendars, when using HtmlControls,
so you will have to decide to do it yourself, like in classic ASP, or switch to WebControls.
Thanks, Paul Wilson, ASPInsider, MC**
For the best .NET code, examples, and tools, visit:
WilsonDotNet.com, WilsonWebPortal.com, ORMapper.net