user3339242
user3339242

Reputation: 641

AJaxControlToolKit error

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" />

Upvotes: 0

Views: 565

Answers (1)

malkam
malkam

Reputation: 2355

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

Upvotes: 1

Related Questions