If you know that the users of your Web Forms pages have uplevel browsers, you can add functionality to your pages by including client script that runs in the browser, apart from the server controls you are using.
NOTE: For information about uplevel and downlevel browsers, see Web Forms Controls and Browser Capabilities.
Because client script runs in the browser, you can include it in the page for operations that manipulate the look of the page and require quick response time. Examples include enabling and disabling controls, performing mouseover operations, animating elements on the page, and so on.
As a rule, client script runs entirely separately from the server code that you create for your Web Forms page, and you can therefore create whatever script is required in your page. However, a few ASP.NET server controls depend on client script for their functionality. This does not prevent you from using client script when working with those controls, but you do need to understand the interaction of your client script with the client script that is produced by these controls.
The ASP.NET server controls that depend on being able to run client script include:
NOTE: For information on creating event handlers that run in both client script and in server code, see Web Forms Event Model.
The client script required is automatically generated and sent as part of the page. It is compatible with all types of browsers that support at least ECMAScript ( JScript, JavaScript ) — that is, it does not depend on the advanced scripting capabilities of Dynamic HTML ( DHTML ).
NOTE: Some validation features can take advantage of DHTML if it is available in the browser, but DHMTL is not required.
Users sometimes disable script in a browser as a security measure. If they have, the functionality provided by client script is lost. This disables some controls, such as the LinkButton control, entirely, and disables the functionality of the AutoPostBack property. Validation is only partially affected; validation still functions, but users do not get the immediacy and performance of client-side validation.
© 2000-2010 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support asp.net.ph