Ajax 工具包 ASP.NET (Visual Basic) 不显示日历
我尝试在 ASP.NET 页面中使用 Ajax Toolkit
来显示带有此代码的日历扩展器,但它对我不起作用。
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<br />
<br />
<b>Calendar :</b><br />
<asp:TextBox ID="Date1" runat="server"></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="Date1">
</asp:CalendarExtender>
</div>
</form>
它不显示日历。
有什么问题吗?
I'm trying to use Ajax Toolkit
in ASP.NET page to display a Calendar Extender with this code, but it's not working for me.
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<br />
<br />
<b>Calendar :</b><br />
<asp:TextBox ID="Date1" runat="server"></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="Date1">
</asp:CalendarExtender>
</div>
</form>
It's not displaying the calendar.
What's the problem ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试:
更新:
您的 web.config 中是否有以下内容?
更新 II
将以下内容放在您的 aspx 页面的顶部。
另外,您引用的是 AjaxControlToolkit.dll,对吗?它应该位于您的 bin 目录中。右键单击项目,选择Add Reference菜单进行添加。
Try:
Update:
Do you have the following in your web.config?
Update II
Put the following at the top of your aspx page.
Also, you're referencing AjaxControlToolkit.dll, right? It should be in your bin directory. Right-click project, Add Reference menu choice to add.
您是否已为 CalendarExtender 添加了
Register
指令?(或者像 Steve 建议的那样将其添加到 web.config 中)
您是否添加了对 AjaxControlToolkit dll 的程序集引用?
Have you added a
Register
directive to your page for the CalendarExtender?(Or added it in web.config like Steve suggested)
Have you added an assembly reference to the AjaxControlToolkit dll?
嗯,这是由 ScriptManager 引起的。我有同样的问题。解决方案非常简单,只需从页面或您放置的位置删除 ScriptManager,
即删除 scriptmanager 后,只需放置 ToolkitscriptManager 或下面的代码:
您可以在工具栏 -> 中找到它ajax 选项卡不在 Ajax 扩展选项卡中。我希望它能解决你的问题
Well it is caused by ScriptManager. I have this same issue. The solution is very simple just delete ScriptManager From page or where you placed i.e.
Once you delete scriptmanager then just place ToolkitscriptManager or below code:
You can find this in toolbar -> ajax tab not in Ajax Extensions tab. I hope it will solve your issue