ASP.Net UpdatePanel ImageButton calls "this._postbackSettings.async is null or not an object"

I get this error in the update panel inside popupControlExtender, which is located in dragPanelExtender.

I see that many other people have this problem and have various fixes, none of which worked for me.

I would like to hear a logical explanation of why this is happening, and a reliable way to avoid such problems in the future.

I found that, like others, this error does not occur when the trigger is LinkButton and not ImageButton, still wondering if anyone has an explanation.

+3
source share
3 answers

, UpdatePanel "async" . , , ( , popupControlExtender - , show/hide).

, - , script (, ).

, "this._postbackSettings.async" - AJAX.NET, , . , , postback ( postback , ).

... , " " !

+1

, 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

Settign "EnablePartialRendering" false ScriptManager , . , .

Just for the record, I didn’t do exactly the same as other people who saw the mistake. I have a PopupControlExtender in which there is a checkboxlist. I added a select all link using the javascript method to programmatically select / deselect. I do not use Imagebutton. I did not see the error before adding javascript, and now even after removing it, the error remains. There must be another change that I am missing.

I hope this helps someone ...

- Matt

+1
source

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


All Articles