Skip to main content
AJAX Date picker in ASP.NET Snapshot 01

AJAX Using Date Picker in ASP.NET

In this post, let’s see how we can use AJAX date picker in ASP.NET. Download the AjaxControl.dll using this link. Add the Ajax control toolkit dll file as reference in your ASP.NET Website application. (In solution explorer right click on your  project name > Add Reference > Select AjaxControlToolKit.dll).

In your ASP.NET design page (.aspx) add this line to reference the toolkit.

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html>

Now, add a ToolScriptManager or ScriptManager inside your ASPX page like below :

<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>

 

Finally, add a ASP.NET Textbox control and AJAX Calendar (Date picker) control below it and reference it to the textbox.

<td>From Date :
</td>
<td>
<asp:TextBox ID="txtFromDate" runat="server"></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender1" runat="server" Format="MM-dd-yyyy"
TargetControlID="txtFromDate">
</asp:CalendarExtender>
</td>

This will produce Date picker at runtime in your browser.

 

AJAX Date picker in ASP.NET Snapshot 01
AJAX Date picker in ASP.NET Snapshot 01