How to use CalendarExtender Control

Here are the simple code snippet to use CalendarControl of AjaxControlToolkit

Add following code o your page


        <asp:ScriptManager ID=”ScriptManager1″ runat=”server”>
            <asp:Panel ID=”Panel1″ runat=”server”>
                <asp:Label ID=”Label1″ runat=”server” Text=”Date”></asp:Label>
                <asp:TextBox ID=”TextBox1″ runat=”server”></asp:TextBox><asp:Button ID=”ShowCal”
                    runat=”server” Text=”Show Cal” />
                <cc1:CalendarExtender ID=”TextBox1_CalendarExtender” runat=”server” Enabled=”True”


   <asp:ScriptManager ID=”ScriptManager1″ runat=”server”></asp:ScriptManager>

  <asp:TextBox ID=”TextBox1″ runat=”server”></asp:TextBox>         <cc1:CalendarExtender ID=”TextBox1_CalendarExtender” runat=”server” Enabled=”True”     TargetControlID=”TextBox1″/>


Now clciking on the TextBox, it  will popup a Calendar. 

i guess its too easy than the old javascript Calendar popup. Isn’t it .


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s