locked
How to use ajax in 4.5 framework asp.net site ? RRS feed

  • Question

  • User-851246726 posted

    I created a new blank website project in visual studio 2012.

    I downloaded  the latest library of ajax tool kit from here: http://ajaxcontroltoolkit.codeplex.com/

    I added the dll in  reference in the project but everytime I try to put any control in the pagem it gives the following error:

    Line: 312
    Error: Unable to get property 'UI' of undefined or null reference

    any help ?

    Wednesday, October 2, 2013 4:28 PM

Answers

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 3, 2013 12:31 AM
  • User-1635195291 posted

    Hi jeffcarter,

    Ajax Control Toolkit

    The Ajax Control Toolkit contains a rich set of controls that you can use to build highly responsive and interactive Ajax-enabled ASP.NET Web Forms applications. Follow the steps below to download and start using the Ajax Control Toolkit with Visual Studio:

    Download the Ajax Control Toolkit
    The first step is to download the Ajax Control Toolkit. You can download the latest version of the Ajax Control Toolkit from CodePlex.

    Click the Downloads tab at the CodePlex site to see the list of available Ajax Control Toolkit downloads. If you are using Visual Studio 2008 then you should pick the version of the Ajax Control Toolkit for .NET 3.5. If you are using Visual Studio 2010 then you can use either the .NET 4 or .NET 3.5 versions of the Ajax Control Toolkit.

    Download the Binary version and not the Source version of the Ajax Control Toolkit. You should download the Source version of the Ajax Control Toolkit only when you are interested in extending the Ajax Control Toolkit.

    Extract the Download
    After downloading the Ajax Control Toolkit, you need to unblock and extract the files. Right-click the compressed file and click the Unblock button.

    Next, right-click the compressed file and select the Extract All menu option. 

    Add the Ajax Control Toolkit to the Visual Studio Toolbox
    The next step is to add the Ajax Control Toolkit to the Visual Studio Toolbox. Follow these steps:

    1. Launch Visual Studio and create a new ASP.NET Web Forms project or website. Open Default.aspx in the Visual Studio editor.
    2. Create a new Toolbox tab by right-clicking the Toolbox and selecting Add Tab. Name the new tab Ajax Control Toolkit.
    3. Right-click beneath the new tab and select the menu option Choose Items... Click the Browse button and browse to the folder where you extracted the Ajax Control Toolkit. Pick the AjaxControlToolkit.dll and click the OK button to close the Choose Toolbox Items dialog.

    Read Ajax Control Toolkit Tutorials
    Visit the tutorials page to learn how to use the Ajax Control Toolkit controls.

    Source: http://www.asp.net/ajaxlibrary/act.ashx

    or else refer:

    http://stackoverflow.com/questions/17996741/ajax-cotrol-toolkit-is-not-working-properly-in-vs-2012-asp-net-c-sharp-net-4-5

    Hope this helps.

    Thanks,

    Jatin

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 7, 2013 8:34 PM

All replies

  • User2103319870 posted

    If you are using ScriptManager, instead of it, replace it with ToolkitScriptManager and set CombineScripts="false" on the toolscript manager.

    Check the below link

    1. Ajax Control ToolKit Issue
    Wednesday, October 2, 2013 4:42 PM
  • User-851246726 posted

    I just did this

    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="false"></ajaxToolkit:ToolkitScriptManager>
    
        <ajaxToolkit:Rating ID="Rating1" runat="server" CurrentRating="2"
        MaxRating="5"
        StarCssClass="ratingStar"
        WaitingStarCssClass="savedRatingStar"
        FilledStarCssClass="filledRatingStar"
        EmptyStarCssClass="emptyRatingStar"></ajaxToolkit:Rating>



    Now getting this error:

    first  error

    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.

    second error: 

    Line: 2
    Error: Object doesn't support property or method 'registerComponent'

    Wednesday, October 2, 2013 5:01 PM
  • User-851246726 posted

    Here is my code in aspx page in case you want to see

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Ajax.aspx.cs" Inherits="HuntingtonFireDistrict_Inventory.Ajax" %>
    <%@ Register
        Assembly="AjaxControlToolkit"
        Namespace="AjaxControlToolkit"
        TagPrefix="ajaxToolkit" %>
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            
            <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="false"></ajaxToolkit:ToolkitScriptManager>
    
        <ajaxToolkit:Rating ID="Rating1" runat="server" CurrentRating="2"
        MaxRating="5"
        StarCssClass="ratingStar"
        WaitingStarCssClass="savedRatingStar"
        FilledStarCssClass="filledRatingStar"
        EmptyStarCssClass="emptyRatingStar"></ajaxToolkit:Rating>
        </div>
        </form>
    </body>
    </html>
    



    Wednesday, October 2, 2013 5:02 PM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 3, 2013 12:31 AM
  • User-1635195291 posted

    Hi jeffcarter,

    Ajax Control Toolkit

    The Ajax Control Toolkit contains a rich set of controls that you can use to build highly responsive and interactive Ajax-enabled ASP.NET Web Forms applications. Follow the steps below to download and start using the Ajax Control Toolkit with Visual Studio:

    Download the Ajax Control Toolkit
    The first step is to download the Ajax Control Toolkit. You can download the latest version of the Ajax Control Toolkit from CodePlex.

    Click the Downloads tab at the CodePlex site to see the list of available Ajax Control Toolkit downloads. If you are using Visual Studio 2008 then you should pick the version of the Ajax Control Toolkit for .NET 3.5. If you are using Visual Studio 2010 then you can use either the .NET 4 or .NET 3.5 versions of the Ajax Control Toolkit.

    Download the Binary version and not the Source version of the Ajax Control Toolkit. You should download the Source version of the Ajax Control Toolkit only when you are interested in extending the Ajax Control Toolkit.

    Extract the Download
    After downloading the Ajax Control Toolkit, you need to unblock and extract the files. Right-click the compressed file and click the Unblock button.

    Next, right-click the compressed file and select the Extract All menu option. 

    Add the Ajax Control Toolkit to the Visual Studio Toolbox
    The next step is to add the Ajax Control Toolkit to the Visual Studio Toolbox. Follow these steps:

    1. Launch Visual Studio and create a new ASP.NET Web Forms project or website. Open Default.aspx in the Visual Studio editor.
    2. Create a new Toolbox tab by right-clicking the Toolbox and selecting Add Tab. Name the new tab Ajax Control Toolkit.
    3. Right-click beneath the new tab and select the menu option Choose Items... Click the Browse button and browse to the folder where you extracted the Ajax Control Toolkit. Pick the AjaxControlToolkit.dll and click the OK button to close the Choose Toolbox Items dialog.

    Read Ajax Control Toolkit Tutorials
    Visit the tutorials page to learn how to use the Ajax Control Toolkit controls.

    Source: http://www.asp.net/ajaxlibrary/act.ashx

    or else refer:

    http://stackoverflow.com/questions/17996741/ajax-cotrol-toolkit-is-not-working-properly-in-vs-2012-asp-net-c-sharp-net-4-5

    Hope this helps.

    Thanks,

    Jatin

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 7, 2013 8:34 PM