精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
I've written several DotNetNuke modules, but this is the first time I've tried to incorporate any extenders from the Ajax Control Toolkit.
我已经写了几个DotNetNuke的模块,但是这是我第一次尝试从Ajax控件工具包包含使用任一扩展。
I've reduced the current module to just a textbox and a calendar extender and I can't get the extender to work. The module loads, but I get a bunch of javascript errors on the page. The most descriptive message is:
我已经减少了当前模块到只有一个文本框和一个日历插件,但插件不工作。该模块加载了,但我得到了一堆页面JavaScript错误。常见的描述消息是:
AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.
AjaxControlToolkit需要ASP.NET AJAX 4.0的脚本。确保脚本的正确版本参考。如果您使用的是ASP.NET的ScriptManager,切换到ToolkitScriptManager在AjaxControlToolkit.dll。
I've tried a few things already, but nothing seems to be working.
我已经尝试了一些事情了,但似乎没有任何进展。
Ideas? 想法?
Markup: 标记:
<%@ Control language="vb" Inherits="jec.Modules.jec_AjaxTest1.Viewjec_AjaxTest1" AutoEventWireup="false" Explicit="True" Codebehind="Viewjec_AjaxTest1.ascx.vb" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %> <div> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:CalendarExtender ID="TextBox1_CalendarExtender" runat="server" Enabled="True" TargetControlID="TextBox1"> </asp:CalendarExtender> </div>
Codebehind: 后台代码:
Imports System.Web.UI Imports System.Collections.Generic Imports System.Reflection Imports DotNetNuke Imports DotNetNuke.Services.Exceptions Imports DotNetNuke.Services.Localization Namespace jec.Modules.jec_AjaxTest1 Partial Class Viewjec_AjaxTest1 Inherits Entities.Modules.PortalModuleBase #Region "Event Handlers" Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try Catch exc As Exception 'Module failed to load ProcessModuleLoadException(Me, exc) End Try End Sub #End Region End Class End Namespace
Solution 解决方法
It's clearly a version mismatch. Looks like you are using .NET4.0 where the Ajaxtoolkit is in-built.
这显然是一个版本不匹配。看起来你正在使用.NET4.0其中Ajaxtoolkit是内置。
Version mismatch is the same conclusion I came to as well, but I can't figure out how to resolve the issue. The extenders work just fine with no errors in a standard aspx page.
The way you are trying will work for earlier versions. Either try a sample with VS2008 or reference the DLL's as the error states in your application.
您正在尝试将早期版本的工作方式。无论是尝试用VS2008样品或引用DLL的的错误状态在应用程序中。
But, when used in an ascx wrapped as a DNN module, the extenders fail and I get errors.
版本不匹配是我来也得出同样的结论,但我无法弄清楚如何解决这个问题。该扩展器的工作只是在标准的aspx页面没有错误的罚款。
但是,包装成一个DNN模块的ASCX使用时,扩展失败,我得到的错误。
I can't run .net 4.0 since I'm developing with VS 2008, which also means I can't run ajaxcontroltoolkit 4.0, I believe.
因为我用VS 2008,不能运行.NET 4.0,这也意味着我不能用ajaxcontroltoolkit 4.0开发,我相信。