Reputation: 11
I have created a master page and i am using ajax calendar control for date. I have added ajax calendar control to date textbox. But when I run this, the calendar is not showing. When I click on the text box it is not showing the calendar. What is the problem? Please help.
Here is my code-
<td class="auto-style2"><asp:TextBox ID="txtdob" runat="server" Width="161px" CausesValidation="True" Height="19px"></asp:TextBox>
<asp:ScriptManager ID="ScriptManager1" runat="server" > </asp:ScriptManager>
<cc1:CalendarExtender ID="txtdob_CalendarExtender" runat="server" Enabled="True" TargetControlID="txtdob" Format="mm/dd/yyyy" >
</cc1:CalendarExtender>
</td>
Upvotes: 0
Views: 1036
Reputation: 181
Make sure that you have added AjaxContrlToolKit to Bin folder then Register your ajaxcontrol
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
Upvotes: 0
Reputation: 28403
Try adding ToolkitScriptManager instead of ScriptManager
In format you have Format="mm/dd/yyyy"
mm not valid month
Change it to
Format="MM/dd/yyyy"
<asp:TextBox ID="txtdob" runat="server"
Width="161px" CausesValidation="True"
Height="19px"></asp:TextBox>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:CalendarExtender ID="txtdob_CalendarExtender" runat="server"
Enabled="True" TargetControlID="txtdob"
Format="MM/dd/yyyy" >
</asp:CalendarExtender>
Upvotes: 1
Reputation: 13484
Regist your ajaxcontrol tool kit
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>
Upvotes: 0