These two days are learning ASP , encountered a Web server Controls and HTML control. When I first saw these two controls, I felt very similar.
so I think of the following question: What is the difference between these two controls? Then I saw the HTML server control (plus the runat= "Server" property),
this Web server Controls and HTML server controls are more similar. More silly to divide the unclear, so here to summarize.
One, Web server Controls and HTML the difference between controls
Two, Web server Controls and HTML server Control Differences
HTML server controls are HTML Control plus runat= "Server" attributes are formed.
this way, HTML The control can run on the server side, with loopback capability to maintain the state of the control.
Three, Web server controls so many advantages, why do you have HTML the presence of a server control?
1 , some events, such as press, move, mouse operation and other events, Web server controls do not have these events, this time HTML The control will play its part.
2 , Web server controls consume server resources, have too many page echoes, and must be converted to Xtml control to run, so it is slow to run.
3 , if you only make some static pages, you can use the HTML control, fast reaction.
Since the two exist, there must be a difference, and it certainly has its usefulness. Only in practice can we slowly understand and master the usage between them.
Differences between Web server controls and HTML controls