Microsoft Certified Technology Specialist in .Net
Thanks & Regards
Microsoft MVP (ASP.Net/IIS)
However we can make HTML control accessible to the client side by adding the same runat="server "attribute.
Microsoft Certified Technology Specialist
An html server control is just the server side representation of one html element.
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.
- All HTML server controls must be within a <form> tag with the runat="server" attribute!
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 server control is:
<asp:TextBox id="text_id" runat="server" />
But server side controls are processed in the server and the response would be rendered in a html format
Please mark this as Answer, if this helps
<< Database Administrator >>
Jesus saves! The rest of us better make backups...
Difference between HTML controls and HTML Server controls
a. Runat="server" is added for HTML Server control. Eg: <input id="txtName" runat="server" type="text">
Main Advantage of using HTML server control with asp.net is to provide a better migration path for existing web forms.
1)Equivalent to standard HTML Elements
2)Properties correspond to HTML attributes
1)Use asp:prefix and have run at="server" attribute
2)Generate standard HTML
3)Have custom Properties,events and methods
4)ASP.Net Modifies HTML Generate based on browser and other conditions
5)You can create custom controls