Ajax工具包ASP.NET(Visual Basic)中不显示日历 [英] Ajax Toolkit ASP.NET (Visual Basic) Not Displaying Calendar

查看:153
本文介绍了Ajax工具包ASP.NET(Visual Basic)中不显示日历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用 Ajax工具包在ASP.NET页面来显示与此code日历扩展,但它不是为我工作。

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.

这是什么问题?

推荐答案

尝试:

<ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="Date1">
</ajaxToolkit:CalendarExtender>

更新:

你有你的web.config以下?

Do you have the following in your web.config?

    <pages>
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="asp" />
      </controls>
    </pages>

    <compilation>
        <assemblies>
            <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </assemblies>
    </compilation>

    <httpHandlers>
        <remove verb="*" path="*.asmx" />
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
    </httpHandlers>

    <httpModules>
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </httpModules>

更新II

把下面为您aspx页面的顶部。

Put the following at the top of your aspx page.

<%@ Register Tagprefix="asp" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>

此外,你引用AjaxControlToolkit.dll,对不对?它应该是在你的bin目录中。右键单击项目,添加引用菜单选项的补充。

Also, you're referencing AjaxControlToolkit.dll, right? It should be in your bin directory. Right-click project, Add Reference menu choice to add.

这篇关于Ajax工具包ASP.NET(Visual Basic)中不显示日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆