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,你好!');">
- Web site operators: talk about the conception and survival website
- Talk about keyword density and the relationship between the website ranking
- Talk about how to improve the user experience of Web site
- Creating web pages talk about the naming of CSS style sheets norms
- Select label on the css style (if you have better ways to talk about)
- Talk about individual local classified Web sites to promote and profit
- Talk about the conception and survival Site
- Talk about dynamic web search engine optimization strategy
- What is the talk about the success of Web Design
- In the Internet industry talk about the establishment of the seven-year experience
- RIA development feelings (3) - talk about code
- Personal web pages produced Talk
- HtmlControl and talk about the differences and uses WebControl
- Flash animation skills: Small talk about hair elegant animation
- Talk about web design 10 points
- Talk about the structure of xhtml tags
- Talk about the function of experience web2.0
- Web designers talk about color: the traditional, stable, classical
- Talk about the process of building the web site planning and preparation
- Network interactive talk about one percent of the site




