ASP.NET 中的 CalendarExtender
我在 ASP.NET Web 应用程序中使用 CalendarExtender
控件。我想在文本框内单击时禁用此控件。我还在同一个网页中使用 HtmlEditor
(AJAX 控制工具包),并且我只有一个脚本管理器。我已经完成了以下编码,以便在文本框中获取 CalendarExtender
。
当我编译程序时,我没有收到任何错误,但是当我在文本框中单击时,CalendarExtender
不会出现在网页上。
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="before_adm.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit.HTMLEditor" tagprefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
.
.
.
<asp:TextBox ID="TextBox3" runat="server">
</asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox3">
</asp:CalendarExtender>
在 web.config 中
<add tagPrefix="asp" namespace="AjaxControlToolkit" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
我哪里出错了?如何在文本框中单击时获得 CalendarExtender
。
I am using a CalendarExtender
control in my ASP.NET web application. I want to disable this control while clicking inside a text box. I am also using HtmlEditor
(AJAX control toolkit) inside the same web page and I have only one script manager. I have done the following coding in order to get a CalendarExtender
in a text box.
When I compile the program I don't get any errors, but when I click inside a text box the CalendarExtender
does not appear on the web page.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="before_adm.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit.HTMLEditor" tagprefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
.
.
.
<asp:TextBox ID="TextBox3" runat="server">
</asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox3">
</asp:CalendarExtender>
In web.config
<add tagPrefix="asp" namespace="AjaxControlToolkit" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Where am I going wrong? How will I get a CalendarExtender
on click in a textbox.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信您已经完成了日历教程。即使您已经完成,我想说只需与该参考文献进行比较,然后编写代码以检查缺少什么?
另一件事是将他们的代码复制粘贴到您的项目中,然后查看它是否仍然有效。如果它不起作用,那么您在项目中缺少某种配置,而它正在工作,那么您在页面级编码中缺少某些内容。
PS:我会尝试你的示例,但到目前为止我的机器上还没有配置 Ajax 工具包。
I believe you have already gone through Calendar Tutorial. Even if you have gone through, I would say just compare with that reference and you code to check what is missing?
Another thing would be copy paste their code in your project and then see if it is still working. If it is not working then you are missing some kind of config in your project and it is working then you are missing something in your page level coding.
PS: I would have tried your sample but as of now I don't have Ajax toolkit configured in my machine.