locked
Getting error in AJAX modal popupextender RRS feed

  • Question

  • User-1404317421 posted

    Hello,

    I've an ajax modalpopupextender in an usercontrol, Which displays a list of employees when clicked on search button. I'm not able to see the modalpopupextender when clicked on search button. Getting the below error in debug mode

    Microsoft JScript runtime error: Unable to get value of the property 'UI': object is null or undefined 

    Sys.Application.add_init(function() {
        $create(Sys.Extended.UI.ModalPopupBehavior, {"CancelControlID":"ModalPopUpAllEHS1_imgclose","OnCancelScript":"hide()","PopupControlID":"ModalPopUpAllEHS1_panelpopup","PopupDragHandleControlID":"ModalPopUpAllEHS1_panelpopup","dynamicServicePath":"/EHSTrack/Personnel/IndustrialHygiene_Add.aspx","id":"ModalPopUpAllEHS1_modalpopupextender1","repositionMode":0}, null, null, $get("ModalPopUpAllEHS1_panelpopup"));
    });

    Can anyone please help me out in resolving this issue? Not able to find why this issue is coming

    Thanks,

    Thursday, February 6, 2014 7:10 AM

Answers

  • User2103319870 posted

    Hi,

    Please check if you have targeted the right versions of .NET Framework. For newer verisons of AJAX control toolkits, it goes with .NET Framework 3.5 or 4

    To check the framework please folllow the below steps

    1)  Open the Solution Explorer

    2)  Right click on your WebProject

    3)  Select the Properties option

    4)  Ensure you are in Application Tab(first one)

    5) You can see the Target Framework Dropdown there , Ensure that it is of latest version.

    Source URL

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 10, 2014 7:03 PM

All replies

  • User2103319870 posted

    Hi,

    Are you using ScriptManager in your page,

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

    If you are using script Manager then replace it with ToolskitScriptManager

     <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="false">
            </asp:ToolkitScriptManager>

    Source URL

    Thursday, February 6, 2014 7:35 AM
  • Sunday, February 9, 2014 10:47 PM
  • User-1404317421 posted

    A2H

    If you are using script Manager then replace it with ToolskitScriptManager
     <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="false">
            </asp:ToolkitScriptManager>

    Hello,

    Did all these changes, The page worked fine for few minutes and again it started throwing error "The requested script resource 'Common.Common.js' requires version 'AjaxControlToolkit, Version=4.1.50508.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' of the ASP.NET AJAX Framework. To use this resource, make sure that the application references version 'AjaxControlToolkit, Version=4.1.50508.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e'."

    Why is this happening? Getting frustrated after seeing this error, Now i've changed my ajaxtoolkit dll to version 4.1.50508.0.

    Changed scriptmanager to toolkitscriptmanager and viceversa, But there is no change at all,. The page is working fine for few minutes and later it is throwing the above error,

    Please help me out

    Monday, February 10, 2014 4:17 AM
  • User2103319870 posted

    Hi,

    Please check if you have targeted the right versions of .NET Framework. For newer verisons of AJAX control toolkits, it goes with .NET Framework 3.5 or 4

    To check the framework please folllow the below steps

    1)  Open the Solution Explorer

    2)  Right click on your WebProject

    3)  Select the Properties option

    4)  Ensure you are in Application Tab(first one)

    5) You can see the Target Framework Dropdown there , Ensure that it is of latest version.

    Source URL

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 10, 2014 7:03 PM