Thursday, March 26, 2009

The ability to handle events in client script.

Automatic maintenance of the control's state. If the form makes a round trip to the server, the values that the user entered into HTML server controls are automatically maintained when the page is sent back to the browser.
Interaction with validation controls you can easily verify that a user has entered appropriate information into a control.
Data binding to one or more properties of the control.
Support for HTML 4.0 styles if the Web Forms page is displayed in a browser that supports cascading style sheets. Pass-through of custom attributes. You can add any attributes you need to an HTML server control and the page framework will read them and render them without any change in functionality. This allows you to add browser-specific attributes to your controls. For details about how to convert an HTML element to an HTML server control, see Adding HTML Server Controls to a Web Forms Page
Web Server Controls
Web server controls are a second set of controls designed with a different emphasis. They do not map one-to-one to HTML server controls. Instead, they are defined as abstract controls in which the actual HTML rendered by the control can be quite different from the model that you program against. For example, a RadioButtonList Web server control might be rendered in a table or as inline text with other HTML.
Web server controls include traditional form controls such as buttons and text boxes as well as complex controls such as tables. They also include controls that provide commonly used form functionality such as displaying data in a grid, choosing dates, and so on.
Web server controls offer all of the features described above for HTML server controls (except one-to-one mapping to HTML elements) and these additional features:
A rich object model that provides type-safe programming capabilities.
Automatic browser detection. The controls can detect browser capabilities and create appropriate output for both basic and rich (HTML 4.0) browsers.
For some controls, the ability to define your own look for the control using templates
For some controls, the ability to specify whether a control's event causes immediate posting to the server or is instead cached and raised when the form is submitted.
Ability to pass events from a nested control (such as a button in a table) to the container control.
At design time in HTML view, the controls appear in your page in a format such as:
<
The attributes in this case are not those of HTML elements. Instead, they are properties of the Web control.
When the Web Forms page runs, the Web server control is rendered on the page using appropriate HTML, which often depends not only on the browser type but also on settings that you have made for the control. For example, a Textbox control might render as an INPUT tag or a TEXTAREA tag, depending on its properties.

No comments:

 
ss_blog_claim=b2020e0f26362b8071fda24b7fed8308 ss_blog_claim=b2020e0f26362b8071fda24b7fed8308