Microsoft JScript runtime error: "this._postBackSettings.async" is null or not an object

I have a report on my asp page, and every time I change the filter and view the view report, I get this error:

Microsoft JScript runtime error: "this._postBackSettings.async" is null or not an object

I tried changing EnablePartialRendering = "true" to EnablePartialRendering = "false", but then people cannot log in to the site

+3
source share
6 answers

I found another solution to this problem.

Telerik RadScriptManager RadAjaxManager ( ASP.NET). , JQuery UI, - , "OnClientClick" .

, OnRequestStart OnResponseEnd OnRequestStart OnResponseEnd .

, Telerik, , , AJAX: ajaxified ( , , AJAX), RequestStart/ResponseEnd , ajaxified.

+4

, http://siderite.blogspot.com/2009/02/thispostbacksettingsasync-is-null-or.html, , .

, :

var script = @"
if (Sys &&
    Sys.WebForms && Sys.WebForms.PageRequestManager &&
    Sys.WebForms.PageRequestManager.getInstance) 
{
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    if (prm &&
       !prm._postBackSettings)
    {
        prm._postBackSettings = prm._createPostBackSettings(false, null, null);
    }";

ScriptManager.RegisterOnSubmitStatement(
    Page, 
    Page.GetType(), 
    "FixPopupFormSubmit", 
    script);

_postBackSettings, , , _postBackSettings.async.

, ,

G.

+2

( ), DefaultButton = "Button1"

.

+1

, : asp.net . , javascript :

event.cancelBubble = true;
if (event.stopPropagation)
    event.stopPropagation();

, . , asp.net ajax , , , - , . , :) ,

+1

, .

The problem arose after I moved ScriptManager to the main page - and only when I used pages without update panels.

Solved by moving the ScriptManager tag immediately before the content area of ​​the main page.

Problems with JavaScript ordering?

+1
source

This problem is solved by setting EnablePartialRenderingto false ScriptManager.

ScriptManager1.EnablePartialRendering  = false;

In the OnInitevent of the page where it is used rsweb:ReportViewer. If you want to enable for another page, set to true on the main page OnInit.

+1
source

Source: https://habr.com/ru/post/1697707/


All Articles