- Skill level:
- Moderately Challenging
Other People Are Reading
Things you need
- Microsoft ASP.NET AJAX Control Toolkit
Download the Microsoft AJAX Control Toolkit. Right-click the file and select "Properties." On the "General" tab, click "Unblock" and then "OK."
Right-click the file and select "Extract" to uncompress the files to a folder on your PC, such as C:\ajax.
Click "Start," "All Programs," "Microsoft Visual Studio 2010 Express" and "Microsoft Visual Web Developer 2010 Express." Click "New Web Site" on the "Start" page. Select your preferred programming language in the left pane and "ASP.NET Web Site" in the right pane.
Select "File System" under "Location." Browse to the folder on your PC for the new website or enter a new website at the end of the suggested file location (e.g., C:\Users\yourname\Documents\Visual Studio 2010\WebSites\MyAjaxSite). Click "OK."
Right-click within the toolbox and select "Add Tab." Enter "Ajax Control Toolkit" on the new tab.
Right-click beneath "Ajax Control Toolkit" and select "Choose Items." Browse to C:\ajax or wherever you extracted the toolkit. Select "AjaxControlToolkit.dll" and click "Open." Click "OK."
Add AJAX Control Toolkit to Visual Web Developer Express
Right-click the top level under "Solution Explorer" and select "Add New Item." Select "Web Form," name the new Web page (e.g., AjaxCalendar.aspx) and click "Add."
Drag the "ToolkitScriptManager" from the "Ajax Control Toolkit" in the toolbox onto the web form page. Drag a TextBox server control from the "Standard" tab onto the page. Edit the ID (e.g., "txtStartDate)" in source view or in the properties pane.
Drag a "CalendarExtender" from the "Ajax Control Toolkit" to the page. Click the control then change "TargetControlID" In the Properties pane to match the ID of the TextBox server control.
Save the page using "File" and then "Save." Press "Ctrl" and "F5" to preview and test the page using the built-in ASP.NET development server.
Click in the text box and a calendar picker will display. Select a date and it will be entered into the text box.
Adding an AJAX Control to a Web Form
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for