HtmlControl and talk about the differences and uses WebControl

Related Tags:

  html Web controls and controls Although the same-good and长得很like, but they realize the internal mechanism is not the same 
  Html Web controls than the efficiency of better controls 

  1. Also quite easy to use, and cite a simple example, such as the formation Button: 
  Html control is to control the huge pool all get page, which features used on the set about attributes, as follows: 
  <input Type=submit/button runat=server> 
  This will occupy a large resource control 

  Web is the integrated control of the dismantling of a single-function: 
  <asp:button Id="btnOK" /> 
  This can save unnecessary controls occupied by the resources 

  2.Web sent to a control function can be used to maintain control of the state ViewState. 
  Html can not control, when the pages click operation, its status will be lost. 
  This can be done an experiment: 
  I. respectively, the establishment of two documents: a.html b.aspx 
  II. Increase in a.html Html page RadioButton controls and a button, 
  In b.aspx Canada Web RadioButton controls and a button 
  Double-click browser III.a.html direct running IIS running through b.aspx 
  IV. A.html operation in the interface, check RadioButton, then click the button Button will be found RadioButton Uncheck (lost its status), but in b.aspx pages the same, RadioButton not lost, because ViewState 
  The state to save it, you can run in the browser menu interface click "Show" -> "source document" open Html code documents, 
  Encryption find the ViewState, similar to the following: 
  <input Type="hidden" name="_VIEWSTATE" value="dDw0ajfmafmjfzzmj4"/> 
  In fact ViewState principle to achieve some of the information will also put a hidden control, and information asp.net generated ViewState 

  Is stored in the client must pay attention to here is the point: 
  Only when the format *. aspx files, and control of property: "runat = server", the function can open-back 

  3. Html controls and Web controls biggest difference is that they handle the incident on the different methods.    The Html form controls, 
  When a trigger event, the browser will handle it.    But for Web control, the incident generated only by the browser, but the browser does not deal with it, to give the client server, a message that the server handling the incident.    But some incidents, 
  For example: 
  Press the button / mobile / mouse and so on, these incidents did not Asp.net 
  (Because these incidents immediate strong enough timely processing server), which controls the Html when play its role, with Html incident 

  Assist in the completion. 

  Html following are some popular events: 
  In the browser controls on the implementation of the Html events: 

  Click triggered when: 
  <INPUT Type="button" value="Click Me" onclick="alert('Hi,你好!');"> 

  Triggered when the mouse pops up: 
  <INPUT Type="button" value="Click Me" onmouseup="alert('Hi,你好!');"> 

  / / Suspended in the top of controls that trigger 
  <INPUT Type="button" value="Click Me" onmouseover="alert('Hi,你好!');"> 

  / / Mouse control to trigger the top mobile 
  <INPUT Type="button" value="Click Me" onmousemove="alert('Hi,你好!');"> 

  / / Double-click control to trigger 
  <INPUT Type="button" value="Click Me" ondblclick="alert('Hi,你好!');"> 

  / / When the focus of the controls, buttons that trigger 
  <INPUT Type="button" value="Click Me" onkeypress="alert('Hi,你好!');"> 

  / / Button trigger 
  <INPUT Type="button" value="Click Me" onkeydown="alert('Hi,你好!');"> 

Related articles:

Website operators and the promotion of effective programmes
  Web site to promote comprehensive solution    Web site on the network to promote the importance of marketing effectiveness is the consensus of network marketing, Web site promotion network marketing has become one of the basic elements, and why some of the web sites that promote, ...
Sec expressed JScript function and Application Note
  Matching the text as a model replacement, search and extract a powerful tool, the regular expression (Regular Expression) applications have gradually infiltrated into the unix platform to the development of the network, as a server / client-side scripting language JScript development is the ...
Wangzhuan 315 collection sites typical crook
  315 Wangzhuan concern - collected some companies to deceive the Wangzhuan    Below collection compiled some typical network swindlers companies and Web sites to make money, to the broad masses of Wangzhuan friends carefully, so as to avoid being duped.    Cashfiesta&nbs...
Site basic color - rich
  To show color, the thick, rich flu can be used to a powerful combination of color and its dark color from the meeting.    For example, deep red wine brandy is in the red and black, as produced in the vineyards of France, the wine aging Chunmei, symbolizing wealth.    Cogna...
Fw and Dw combinations: see examples of biopsy
  Weaving dreams Forum (http://www.it365cn.com/bbs/), a lot of people asked the question on the section, there are also many people write such a guide, which also have examples like this to explain this through, see After some think that if the text is hot for beginners will be the case in some...