开发者

Ajax calendar extender not available despite script manager?

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="TbEff开发者_如何转开发ectiveDate" 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>


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 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜