1. html Server Control: it is actually a control composed of the HTML control plus runat = "server. the differences between them are that HTML controls run on the client, while HTML server controls run on the server. All HTML server controls inherit the htmlcontrol class, which can be divided into three types: htmlinputcontrol, htmlcontainercontrol, and htmlimage ).
2. Web Server Control: Also known as Asp.net Server Control, which can display more advanced functions than HTML. It is a basic element of web form programming and also exclusive to Asp.net. It generates one or more HTML controls based on the client, rather than directly describing HTML elements. For example, <asp: button id = "button2" runat = "server" text = "button"/>.
3. What are the differences between HTML server controls?
1) The Asp.net Server Control provides a more unified programming interface. For example, each Asp.net Server Control has the text attribute.
2) Hide the differences between the client, so that the programmer can focus more on the business, instead of considering whether the client browser is IE, Firefox, or a mobile device.
3) The Asp.net server control can be saved to viewstate, so that the page can be saved during the process of uploading the page from the client back to the server or downloading it from the server to the client.
4) different event processing models: HTML tagging and HTML Server Control event processing are on the client page, while Asp.net server controls are on the server.
For example:
<Input id = "botton" type = "button" value = "button" runat = "server"/>
It is an HTML server control. At this time, we click this button and the page will not be uploaded back to the server, because we did not define a mouse click event for it. We add an onserverclick event for the HTML Server Control:
<Input id = "botton" type = "button" value = "button" runat = "server" onserverclick = "test"/>
Click this button to send the page back to the server and run the test (objecdt sender, eventargs e) method.
The following code:
<Asp: button id = "button" runat = "server" text = "button"/>
Is an ASP. NET Server Control, and we do not define a click for it. However, when we click it, the page will be sent back to the server.
It can be seen that HTML tagging and HTML server control events are triggered by pages, while Asp.net server controls are sent back to the server by pages for processing.
Transferred from [FLORA]