Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ajax Control Toolkit.

Similar presentations


Presentation on theme: "Ajax Control Toolkit."— Presentation transcript:

1 Ajax Control Toolkit

2 Download the Ajax Toolkit Control from www.asp.net website
Install Using The Readme file

3 Creating a Simple Auto-Complete TextBox
Create a WebSite (wont work with project) Add a ToolkitScriptManager Add a TextBox Control Add an AutoCompleteExtender (drop it on text control). To add the static page method click on the Add AutoComplete page method smart tag option. Selecting this menu option will create a new page method named GetCompletionList:

4 Creating a Simple Auto-Complete TextBox
Add the Following so that a simple autocomplete will be displayed. (More complex examples which retrieves info from db could be organized also). [System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]   public static string[] GetCompletionList(string prefixText, int count, string contextKey) {       // Create array of movies       string[] movies = {"Star Wars", "Star Trek", "Superman", "Memento", "Shrek", "Shrek II"};          // Return matching movies       return (from m in movies where m.StartsWith(prefixText,StringComparison.CurrentCultureIgnoreCase) select m).Take(count).ToArray();  

5 Displaying a Simple Popup Calendar
Create a WebSite (wont work with project) Add a ToolkitScriptManager Add a TextBox Control Add a Add a CalendarExtender (drop it on text control). Then it works fine.

6 Ajax Control Toolkit ConfirmButton
ConfirmButton is an extender that catches clicks on a button (or on any instance of a type that is derived from Button) and displays a message to the user. If the user clicks OK, the button or link functions normally. If the user does not click OK, the click event is trapped and the button does not perform its default submit behavior. Optionally, you can specify client script to execute when the buttons are clicked in the confirm dialog box. This is useful if you use the ConfirmButton extender with a button that performs a delete operation or another task that might require confirmation from the user

7 Ajax Control Toolkit ConfirmButton
Create a WebSite (wont work with project) Add a ToolkitScriptManager Add a Button Control Add a Add a Confirm Button(drop it on text control). Modify confirm text with the message as you wish.

8 Ajax Control Toolkit Editor
HTMLEditor is an ASP.NET AJAX Control that allows you to easily create and edit HTML content. Various buttons in toolbar are used for content editing. You can see generated HTML markup and preview document. Simply Drop an editor on your form.

9 Ajax Control Toolkit Password Extender
PasswordStrength is an ASP.NET AJAX extender that can be attached to an ASP.NET TextBox control used for the entry of passwords. The PasswordStrength extender shows the strength of the password in the TextBox and updates itself as the user types the password. The indicator can display the strength of the password as a text message or with a progress bar indicator. The styling and position of both types of indicators is configurable. The required strength of the password is also configurable, allowing the page author to tailor the password strength requirements to their needs. The text messages that describe the current strength of the password can also be configured and their default values have localization support built-in. The second and third extenders' strings are being pulled from Toolkit resources files. We do not have strings for all languages currently so they may show non-localized values for some languages. A help indicator can be used to provide explicit instructions about what changes are required to achieve a strong password. The indicator is displayed when the user begins typing into the TextBox and is hidden from view once the TextBox loses focus.

10 Ajax Control Toolkit Validator Callout
ValidatorCallout is an ASP.NET AJAX extender that enhances the functionality of existing ASP.NET validators. To use this control, add an input field and a validator control as you normally would. Then add the ValidatorCallout and set its TargetControlID property to reference the validator control.

11 Other Interesting Extenders
Accordion Control Modal Popup Numeric UpDown Control


Download ppt "Ajax Control Toolkit."

Similar presentations


Ads by Google