Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1470
Microsoft JScript runtime error: ASP.NET Ajax client-side framework failed to load.
posted

I have a simple ASP.NET application I am changing from classic ASP.NET to Infragistic controls.  I am running .NET Framework 4.0, AJAX Control Toolkit 4, and Infragistics for ASP.NET 4.

Default.aspx has a Infragistics datagrid that has several items in it.  You click ona row to select an item.  It posts back gets the two values in the grid to pass to a details web page (Response.Redirect with the parameters on query string). 

The details web page only has a couple of standard ASP.NET controls on it. 

When the details web page loads - it does properly read the parameters passed on the query string. 

But when the details web page (I guess) renders it throws an error:

In Default.aspx [dynamic]

 

In the lines that read:

 

<script type="text/javascript">

//<![CDATA[

if (typeof(Sys) === 'undefined') throw new Error(' ASP.NET Ajax client-side framework failed to load.');

//]]>

</script>

 

The error is:

 

Microsoft JScript runtime error: ASP.NET Ajax client-side framework failed to load.

Ive tried the other things I can find on the internet regarding this problem. 

Any ideas?

Thanks

 

 

 

  • 1470
    Verified Answer
    Offline posted

    Is Infragistics still around?  Have not heard anything from them.  Anyways - in case someone else is still using their controls - the answer is  - you have to set

    EnableAjax

     

     

    ="false"

    in the WebDataGrid - and then it all works fine.  My grid ended up looking like

     

     

    <ig:WebDataGrid ID="WebDataGrid1" runat="server" DataKeyFields="ApplicationID" EnableDataViewState="true" Width="100%" EnableAjax="false" >

     

     

    <Behaviors>

     

     

    <ig:Selection Enabled="true" CellClickAction="Row" RowSelectType="Single">

     

     

    <AutoPostBackFlags RowSelectionChanged="True" />

     

     

    </ig:Selection>

     

     

    </Behaviors>

     

     

    </ig:WebDataGrid>

  • 1470
    Offline posted

    It appears the problem is when a row is selected, the grid calls the event handler

    WebDataGrid1_RowSelectionChanged

    and you try to access the selected rows in the handler

     

     

     

     

     

     

    If WebDataGrid1.Behaviors.Selection.SelectedRows.Count > 0

    Then

    selectedRow = WebDataGrid1.Behaviors.Selection.SelectedRows(0)

    strApplicationID = selectedRow.Items(0).Value.ToString()

    CodeKey = selectedRow.Items(1).Value.ToString()

    Response.Redirect(

     

     

    "~/Default2.aspx?CodeKey=" & CodeKey.Trim() & "&ApplicationID=" & strApplicationID, True

    )

     

     

     

    End

    Under these circumstances - it blows up.  If the user selects a row in the grid, the event handler is disabled (removed), and the user clicks a button - then the above code works fine.

  • 1470
    Offline posted

    I tried the other ways of doing Response.Redirect (ASP.NET and Infragistics RegisterStartupScript) and neither did any good.  Then I saw examples of where people were using Response.Redirect in Infragistics applications.

    Latest thoughts are that there must be a problem with the data grid.  I need to populate a grid and then the user selects a row of the grid.  When the user selects a row in the grid, it postbacks, and redirects to another web page with different data. 

    This is my data grid for testing purposes for now:

                    <ig:WebDataGrid ID="WebDataGrid1" runat="server" DataKeyFields="ApplicationID" EnableDataViewState="true"
                        Width="100%">
                        <Behaviors>
                            <ig:Selection Enabled="true" CellClickAction="Row" RowSelectType="Single">
                                <AutoPostBackFlags RowSelectionChanged="True" />
                            </ig:Selection>
                        </Behaviors>
                    </ig:WebDataGrid>

    I guess I will spend today removing some of these values to find out if any of them are causing the problem. 

  • 1470
    Offline posted

    I do have a Response.Redirect() from the first webpage to the other webpage.  Looks as is Infragistics does not like Response.Redirect ?