AJAX Postbacks not working with any masterpage other than default.master

Consider the following scenario:

You develop a webpart using AJAX that works fine with SharePoint default masterpage (default.master), but as soon as you use a different masterpage, for example blueband.master, asynchronous postbacks do not work anymore.

The reason is because in those masterpages, SPWebPartManager server tag is outside of <form></form> tags. To workaround this, you can change the location of the ScriptManager tag and put it inside the <form> tag:

 <form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
<asp:ScriptManager runat="server" ID="ScriptManager1"></asp:ScriptManager>
<WebPartPages:SPWebPartManager runat="server"/>

Important: if you modify a masterpage provided with SharePoint, such as the blueband.master, you must create a copy of it, modify the copy and update the site to use the new one, don't forget this is not supported to modify SharePoint default files (except a very few ones).

Unfortunately this modification has a major drawback, the page title is broken (it is replaced with "\r\n\t") after the first AJAX postback. Fortunately, it can be fixed very easily with the following piece of code that you can add in your webpart:

protected override void OnLoad(EventArgs e)

{

    if (this.Page.IsPostBack)

        this.Page.Title = String.Empty;

}

It seems SharePoint checks the page title, and set it when it is empty.

If your postbacks are even not working with default masterpage, this article probably does not apply to you, take a look at this kb: https://support.microsoft.com/kb/941955.

You can find general information on AJAX integration with SharePoint and practical example on this page: https://msdn.microsoft.com/en-us/library/bb861881.aspx.