difference between web server control and html server control

Carlos's Avatar, Join Date: Dec 2008
Contributor
Hi! I want to know when we should use asp.net server control and html server controls??

However both of them are server side control.

thanx
0
extomas's Avatar, Join Date: Apr 2009
Go4Expert Member
html server??? What is this ?
0
Carlos's Avatar, Join Date: Dec 2008
Contributor
HTML Server controls are simple html controls having runat=server tag in it.
0
gkumar's Avatar
Banned
HTML Server Controls
HTML elements in ASP.NET files are, by default, treated as text. To make these elements programmable, add a runat="server" attribute to the HTML element. This attribute indicates that the element should be treated as a server control.

Note: All HTML server controls must be within a <form> tag with the runat="server" attribute!

Note: ASP.NET requires that all HTML elements must be properly closed and properly nested.


Web Server Controls
Like HTML server controls, Web server controls are also created on the server and they require a runat="server" attribute to work. However, Web server controls do not necessarily map to any existing HTML elements and they may represent more complex elements.

The syntax for creating a Web server control is:
Quote:
<asp:control_name id="some_id" runat="server" />