These are the differences between asp.net controls and html controls
HTML server controls: These are HTML tags that the server understands.
HTML elements in ASP.NET files are treated as text by default. To make these elements programmable, add the runat="server" attribute to the HTML element. This attribute indicates that the item should be considered as a server control. The id attribute is added to identify the server control. The identifier reference can be used to control the server at runtime.
Note. All HTML server controls must be within the <form> using runat = "server". The runat = "server" attribute indicates that the form should be processed on the server. This also indicates that private controls can be accessed by server-side scripts.
Example: < input type="text" id="id1" runat="server" /> This will work. HtmlTextControl Class
< input type="button" id="id2" runat="sever" /> This will not work. There is no compatible control class version for html buttons control.
fixed:
< input type="submit" id="id2" runat="server" />
htmlButton class
< input type="reset" id="id2" runat="sever" /> This will not work.
- ASP.NET - Web Server Management
Web server elements are special ASP.NET tags that the server understands.
Like HTML server controls, web server controls are also created on the server, and this requires the runat = "server" attribute. However, Web server controls are not necessarily mapped to any existing HTML element code, and they can represent more complex elements.
The syntax for creating a web server control is:
< asp:textbox id="Textbox1" runat="server" />
They are also case insensitive. The enforced runat = "server" entry is important here. For HTML controls, this is optional.
all HTML <input type = "text" / "> control attributes are also available for these assembled server controls. There are also some special attributes that we discuss in Ajax for special attributes.