weixin_33692284 2014-07-01 17:02 采纳率: 0%
浏览 40

AJaxControlToolKit错误

My Error:

Microsoft JScript runtime error: 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.

Ive searched through stackoverflow and no solution helps my problem. I am trying to insert a numericupdown extender with a textbox.

I have already changed ScriptManager to ToolkitScriptManager.

<asp:ToolkitScriptManager runat="server" CombineScripts="false">

I have added this at the top of the master and child page.

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

I have removed the msAJaxBundle script reference.

Here's my NumericUpDownExtender

  <asp:NumericUpDownExtender ID="NumericUpDownExtender1" runat="server"
                        TargetControlID="SortOrderTextBox"  
                        Width="120"  
                        RefValues=""   
                        ServiceDownMethod=""  
                        ServiceUpMethod=""  
                        TargetButtonDownID=""  
                        TargetButtonUpID=""   
                        Minimum = "1"  
                        Maximum = "7" />
  • 写回答

1条回答 默认 最新

  • weixin_33696106 2014-07-01 17:14
    关注

    Try to change "TagPrefix" as asp is reserved for asp.net controls.

    Try this in page.

    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>  
    
    <asp:ScriptManager   
                ID="ScriptManager1"  
                runat="server"  
                >  
            </asp:ScriptManager> 
    
    <ajaxToolkit:NumericUpDownExtender ID="NumericUpDownExtender1" runat="server"
                            TargetControlID="SortOrderTextBox"  
                            Width="120"  
                            RefValues=""   
                            ServiceDownMethod=""  
                            ServiceUpMethod=""  
                            TargetButtonDownID=""  
                            TargetButtonUpID=""   
                            Minimum = "1"  
                            Maximum = "7" />
    

    http://asp-net-example.blogspot.in/2009/11/ajax-numericupdownextender-how-to-use.html

    Make sure you've added AjaxControlToolkit.dll to project and added below in web.config.

    <system.web>
    <pages>       <controls>         <add tagprefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"></add>       </controls>     </pages>
    </system.web>
    

    http://www.codingfusion.com/Post/3-Different-ways-to-add-AjaxControlToolkit-in-Asp

    评论

报告相同问题?