Vous êtes sur la page 1sur 10

ASP.

Net AJAX Control Toolkit

What is the ASP.Net AJAX Toolkit?


Open source project for use with ASP.net
Contains over 30 drag and drop controls Not all functions are AJAX

Toolkit includes:
Basic I/O support Data transfer support Client/Server side partial page updates Additional UI graphics/animations and interactivity

Implementing the Toolkit


Download the binary - http://ajaxcontroltoolkit.codeplex.com/ Unblock and extract the files Create new tab under the VS toolbox called AJAX Toolkit
Click Choose Items and select the toolkit file to automatically populate the field

Drag and drop just like other toolbox items All extenders require a ToolkitScriptManager to function.
The ToolScriptManager replaces the ScriptManager for regular AJAX tools provided by MS

Mutually Exclusive Checkbox


Works similar to a radio button but also allows more intuitive de-selection Makes each grouping of checkboxes are mutually exclusive Checkbox Extender
No AJAX functionality, just JavaScript Each checkbox needs a checkbox extender Target Control Id
The id of the desired checkbox

Key
The name of the group of checkboxes (similar to radio buttons)

Password Strength
Gives a written or visual indication of the strength of a users current password Password Strength Extender
No AJAX functionality, just JavaScript Target Control Id
The id of the desired textbox

Required Chars
Select what type of chars are desired and how many of each

Strength indicator type


The type of response to the strength of the password (written, bar, etc.)

Display position
Where the indicator is displayed in relation to the textbox

Filtered Textbox
Filtered Textbox Extender
No AJAX functionality, just JavaScript Target Control Id
The id of the desired textbox

Valid/Invalid Chars
The set of characters allowed in the textbox Can be a predefined or custom group

Accordion
Accordion
True AJAX
Can have server or client side updates

Applying styling to the accordion will add to its visual appeal Fill formats
None, Full, Limit

Fade transitions
Speed, FPS

Border

Accordion
Accordion Panes
Pane Attributes
Header/Content are the only fields in each pane

Populating the Fields


The header and content panels can have labels that are updated by AJAX, or you can databind directly to the fields themselves.

Known Accordion issues


Some users have trouble with the Full and Limit fill formats

Final Opinion
Good:
Free Easy to implement and use Specifically made to work with the ASP.Net framework

Bad:
Not as robust as some other toolkits Many functions are not AJAX at all Quick and easy to use, but no real control over their behavior or attributes

Examples/Tutorials
AJAX Toolkit Implementation Tutorial:
http://www.asp.net/ajax/tutorials/get-started-with-the-ajax-control-toolkit-cs

Mutually Exclusive Checkbox Example:


http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/MutuallyExclusiveCheck Box/MutuallyExclusiveCheckBox.aspx

Password Strength Example:


http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/PasswordStrength/Pass wordStrength.aspx

Filtered Textbox Example:


http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/FilteredTextBox/Filtered TextBox.aspx

Accordion Example:
http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/Accordion/Accordion.asp x

Vous aimerez peut-être aussi