Go4Expert

Go4Expert (http://www.go4expert.com/)
-   ASP (http://www.go4expert.com/forums/asp/)
-   -   difference between web server control and html server control (http://www.go4expert.com/forums/difference-web-server-control-html-t17991/)

Carlos 15Jun2009 03:58

difference between web server control and html server control
 
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

extomas 18Jun2009 18:31

Re: difference between web server control and html server control
 
html server??? What is this ?

Carlos 19Jun2009 15:44

Re: difference between web server control and html server control
 
HTML Server controls are simple html controls having runat=server tag in it.

gkumar 20Jun2009 16:18

Re: difference between web server control and html server control
 
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" />


All times are GMT +5.5. The time now is 23:47.