Reputation: 1379
I've got a calendar extender on one page, and it works fine. Placed in panel with script manager, no problems. On another aspx page, however, using the same format, despite my script manager in the same position, the calendar extender is unavailable. Error message reports that the Calendar Extender is not a known element. Why? Code below for both instances.
Good page:
<asp:Panel ID="Panel1" runat="server" BorderWidth="4px" BorderStyle="Solid" CssClass="myPanelCss" Width="700px">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:Table runat="server" Width="700px">
<asp:TableRow VerticalAlign="Top">
<asp:TableCell>`<asp:TextBox ID="TbEffectiveDate" runat="server"></asp:TextBox>
<asp:CalendarExtender ID="TbEffectiveDate_CalendarExtender" runat="server"
TargetControlID="TbEffectiveDate">
</asp:CalendarExtender>`
Bad page:
<asp:Panel ID="SubPanel" CssClass="myPanelCss" BorderWidth= "4px" BorderStyle="Solid" runat="server" Width="593px">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:Table runat="server" HorizontalAlign="Center" Width="567px">
<asp:TableRow>
<asp:TableCell><asp:TextBox ID="TbEffectDate" runat="server"></asp:TextBox>
<asp:CalendarExtender ID="TbEffectDate_CalendarExtender" runat="server"
TargetControlID="TbEffectDate">
</asp:CalendarExtender>
Upvotes: 0
Views: 3373
Reputation: 66641
I think that you have forget to declare the toolkit at the top of the page
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
and is better declare it as
<ajaxToolkit:CalendarExtender
Upvotes: 1