Sunday, January 3, 2010

Client Script in ASP.NET Web Pages

Client Script in ASP.NET Web Pages: "Client Script in ASP.NET Web Pages

ASP.NET Web applications are not limited to server-based tools and languages. You can include ECMAScript (JavaScript or JScript) in your ASP.NET Web pages to create rich browser-based functionality. A wide range of features for client script support is available in ASP.NET.

One option is to create and add individual snippets of client script to ASP.NET Web pages to support browser behavior that you design for your application. This option is practical if you want to include only a few small pieces of JavaScript code or if you are working with JavaScript code that you already have. This option also helps keep the size of your ASP.NET Web pages to a minimum.

Alternatively, you can take advantage of the powerful AJAX features of ASP.NET. These AJAX features include a complete framework that supports the following:

*

Object-oriented programming in JavaScript.
*

Asynchronous postbacks.
*

Application Web services for authentication and profiles.
*

Server controls that manage client script with extended debugging and trace support.

Using ASP.NET AJAX features lets you take advantage of JavaScript functionality with less manual coding. It provides extended JavaScript functionality, and it provides a framework for creating client functionality that is integrated into ASP.NET.

This topic provides an overview of options for adding client script to ASP.NET Web pages. It contains the following sections:

*

Scenarios
*

Including Custom Client Script in ASP.NET Pages
*

Extending JavaScript with ASP.NET AJAX Features
*

ASP.NET Server Controls That Depend on Client Script
*

Adding Client Script Events to ASP.NET Server Controls
*

Referencing Server Controls in Client Script
*

Raising Client Click Events for Server Controls
*

Communicating Between Client Script and Server Code
*

Creating Client Script Components
*

Adding Client Functionality to Server Controls"