If you haven't had a chance to use the AJAX Control Toolkit in a web application yet, you are really missing out. This is a great set of controls with full source code provided that let you do cool AJAX type stuff with minimal effort. All of them work by extending the funcionality of an existing control such as a textbox or a panel. They are super easy to use. Today I will highlight the use of a simple one.
Here is what the code would look like.
<asp:textbox id="MyDateTimeTextBox" runat="server" />
<asp:image id="MyCalendarImage" ImageUrl="calendar.jpg" />
PopupButtonID="MyCalendarImage" runat="server" />
That is all there is to it. If you don't have the AJAX Control Toolkit installed, there are a few steps to get it ready for use. First make sure you have installed ASP.NET AJAX. Since, it is distributed in source code form, you have to compile the solution to get binaries that you can include. Open the AjaxControlToolkit.sln file and do a compile. The AjaxControlToolkit\bin subfolder will have your binaries that you can include. I recommend adding them to your toolbox to make them easy to use.
Once you get the binaries references in your project, add the following line to the system.web/pages/controls element of your web.config.
<add tagPrefix="ajaxtoolkit" assembly="AjaxControlToolkit"
To see a demo of how the calendar works, check out the link below.
AJAX Control Toolkit Calendar Extender