17 April 2013

Calendar Extender 101

I know it's so simple, but I found many beginners still don't know how to make the CalendarExtender work. So, I posted here the most simple requirement that you need to enable the CalendarExtender in webform:

// Write this above the page
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>




// Add this anywhere in the body
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>




// Add this code ideally beside the server control (example beside a TextBox)

<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="dateTxtBox"></cc1:CalendarExtender>

No comments:

Post a Comment