Introduction
These standards are intended to be used
for software written in JavaScript using the Ajax Control Toolkit.
Ajax Control Toolkit contains a rich set of controls that you can use to build
highly responsive and interactive Ajax enabled ASP.NET Web Forms applications.
Ajax Control Toolkit is set of server controls created by Microsoft and
community to work with ASP.Net AJAX applications. It is available as separate
download in asp.net site.
This toolkit contains number of ASP.Net AJAX
extender controls and an array of web controls that can be used to build rich
internet applications. Extenders are server controls that get coupled with an
exiting server to provide more client side functionality in AJAX applications.
Basically it is a control which emits some javascript code to give extended
functionality to an existing control.
The ASP.NET AJAX Toolkit is a new and powerful control in ASP.NET 2.0. It is
designed for you to develop web applications that are more responsive, faster,
and put fewer loads on the network while using the .NET-based
Ajax
framework. This article will use one of ASP.NET AJAX Toolkit's controls
CollapsiblePanel to demonstrate the benefit by using it.
Some Guideline : The content is split
into sections that can be consumed relatively independently, to enable you to
get started quickly.
- Naming Standards is simply a set of
conventions for naming JavaScript language elements.
- Style Guidelines are preferred ways to
structure and format JavaScript code.
- Design Guidelines define recommended
practices to create maintainable code.
- Programming Guidelines specifies practices
that are beneficial to the JavaScript environment, from a performance,
reliability, maintainability, and compatibility point of view.
How to open AJAX toolkit : The next step
is to add the Ajax Control Toolkit to the Visual Studio Toolbox. Follow these
steps.
- Launch Visual Studio and create a new
ASP.NET Web Forms project or website. Open Default.aspx in the Visual Studio
editor.
- Create a new Toolbox tab by right-clicking
the Toolbox and selecting Add Tab. Name the new tab Ajax Control Toolkit.
- Right-click beneath the new tab and select
the menu option Choose Items... Click the Browse button and browse to the
folder where you extracted the Ajax Control Toolkit. Pick the
AjaxControlToolkit.dll and click the OK button to close the Choose Toolbox
Items dialog.
Example : The div section will be used
to display information returned from a server. The button calls a function named
loadXMLDoc().
Code :
<html>
<body>
<div
id="myDiv"><h2>Let
AJAX change this text</h2></div>
<button
type="button"
onclick="loadXMLDoc()">Change
Content</button>
</body>
</html>