Main menu

Popup calendar allows users to select date and enter in attached text box. So it simply works as datepicker and it is an elegant and easy way to enter date in text boxes. This article will explain how we can achieve this functionality using AJAX Popup Calendar in ASP.NET. In a previous article, I have explained how we can use Calendar Control in ASP.NET.

What is AJAX and what the functionality of AJAX is, is beyond the scope of this article. You just simply need to know that AJAX is web development technique that is used to create asynchronous web applications. AjaxControlToolkit is used to achieve AJAX functionality. AjaxControlToolkit is used to create an interactive and user friendly web experience. It contains more than 30 different controls that achieve different functionalities. Calendar Extender is part of the AjaxControlToolkit and we can easily use this as datepicker in our ASP.NET form with Text box. You can also download complete sample project.

You need to add a ScriptManager control first in your form to achieve AJAX functionality. Further I have added a Text Box and an Image button. Image Button will display an image which I have added in my project’s Image folder. Now we need to add a CalendarExtender from AjaxControlToolkit. We need to set its PopupButtonID attribute to ImageButton control and TragetControlID attribute to text box control. When we click on Image button, a popup calendar will appear and we can select our desire date and that date will be displayed in the text box.