Siaj:
I'd say you are right about plain-jane HTML controls...they are useful when
you don't need them on the server.
The real question is when to user html server controls and web server
controls.
First, the most obvious answer is when you don't have a choice. For example
there's nothing like the repeater/datagrid/datalist/calendar/... in html
server controls so you don't really have a choice. Also, there's nothing
like an input type="file" for web server controls so you have to use the
html server control.
However, html server controls partly exist just to help developers migrate
to ASP.Net because all you need to do is add an id and a runat="server" and
you are up and running. If you are starting a project from scratch, I'd
always prefer web server controls because they provide greater flexibility.
I wouldn't let any performance differences (if there are any) be a factor
because I'd expect it to be extremely small if anything..
(gonna add this one to the FAQ I think)
Hope that helped,
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"siaj" <si**@discussions.microsoft.com> wrote in message
news:FC**********************************@microsof t.com...
Hello All,
Can any one give me a clue when to use Web Server controls/ HTML server
controls/HTML Controls. As I understand ..
HTML controls should be used if u dont need to refer it in the code behind
a(simply bcaz it is not recognized in the code behind IDE) and it does
not make a server trip.
HTML server Controls should be preferred over Web Server controls as they
are light weight than ASP.NET web Server controls.(If they have same
performance why ever use HTML server controls??)
Web Server controls should be used only when that control is not there in
HTML server control...like calender control,datagrid)
any suggestion wil be appreciated..
Cheers,
siaj