我想在单击图像按钮时显示日历,所选日期将显示在文本框中。我使用了ajaxtoolkit,但是有错误显示不是已知元素(ToolkitScriptManager,CalendarExtender)。
的web.config:
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<pages>
<controls>
<add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit"/>
</controls>
</pages>
</system.web>
我的页面:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<table class="auto-style18">
<tr>
<td class="auto-style19">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager> <- error occur there(show not known element)
<asp:TextBox ID="txtExpiredDate" runat="server" Width="260px"></asp:TextBox>
</td>
<td>
<asp:ImageButton ID="ImageButton1" runat="Server" AlternateText="Click here to display calendar" Height="21px" ImageUrl="~/Images/calender.png" Width="26px" />
<asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtExpiredDate" runat="server" /> <- error occur there(show not known element)
</td>
</tr>
</table>