In this article I will explain with an example, how to implement the jQuery DatePicker (Calendar) with TextBox ASP.Net.
This article will also illustrate how to get the selected Date of the jQuery DatePicker (Calendar) on Server Side (Code Behind) on Button click in ASP.Net using C# and VB.Net.
The default Date format for the selected Date is set to MM/dd/yyyy format.
HTML Markup
The following HTML Markup consists of an ASP.Net TextBox and a Button. The ReadOnly property of the TextBox is set to True.
<asp:TextBox ID="txtDate" runat="server" ReadOnly = "true"></asp:TextBox>
<hr />
<asp:Button ID="btnSubmit" runat="server" Text="Submit"
    onclick="btnSubmit_Click" />
Applying jQuery UI DatePicker Plugin to ASP.Net TextBox
Inside the jQuery document ready event handler, the jQuery UI DatePicker Plugin is applied to the ASP.Net TextBox and the default Date format is set to MM/dd/yyyy.
<script src="" type="text/javascript"></script>
<script src="" type="text/javascript"></script>
<link href="" rel="Stylesheet" type="text/css" />
<script type="text/javascript">
    $(function () {
            showOn: 'button',
            buttonImageOnly: true,
            buttonImage: 'images/calendar.png'
Fetching the value of the Selected Date on Server Side
Inside the Button Click event handler, the value of the Selected Date is fetched from the Request.Form collection and it is displayed using JavaScript Alert Message Box.
Note: Request.Form collection is used as in some browsers the Text property does not hold the value set from Client Side when the TextBox is set as ReadOnly.
protected void btnSubmit_Click(object sender, EventArgs e)
    string dt = Request.Form[txtDate.UniqueID];
    ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Selected Date: " + dt + "');", true);
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)
    Dim dt As String = Request.Form(txtDate.UniqueID)
    ClientScript.RegisterStartupScript(Me.GetType(), "alert", "alert('Selected Date: " & dt & "');", True)
End Sub
Implement jQuery DatePicker Plugin with ASP.Net TextBox Control