Note that there are some explanatory texts on larger screens.

plurals
  1. POUpdatePanel doesn't do partial-page update, and IsInAsyncPostBack is always false
    text
    copied!<p>I'm attempting to use an UpdatePanel, but can't get partial-page updates to work.</p> <p>When I look at the ScriptManager's IsInAsyncPostBack property, it's always false.</p> <p>Here's a page that reproduces the issue. It has a ScriptManager, an UpdatePanel, a LinkButton within the update panel, and a Button wired up to the UpdatePanel via the Triggers collection.</p> <pre><code>&lt;%@ Page Language="C#" %&gt; &lt;script runat="server"&gt; protected void Page_Load(object sender, EventArgs e) { Label1.Text = DateTime.Now.ToString(); if (IsPostBack) Label1.Text += " - Postback!"; if (ScriptManager1.IsInAsyncPostBack) Label1.Text += " - Async!"; } &lt;/script&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server" /&gt; &lt;asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server"&gt; &lt;ContentTemplate&gt;Panel 1:&lt;asp:Label runat=server ID=Label1 /&gt;&lt;br /&gt; &lt;asp:LinkButton runat=server ID="LinkButton1" Text="Update!"&gt;&lt;/asp:LinkButton&gt;&lt;/ContentTemplate&gt; &lt;Triggers&gt;&lt;asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" /&gt;&lt;/Triggers&gt; &lt;/asp:UpdatePanel&gt; &lt;asp:Button ID="Button1" Text="Refresh Panel 1" runat="server" UseSubmitBehavior=false /&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>If I run this code and click on either of the buttons, I see "Panel 1:2/8/2010 3:38:41 PM - Postback!"</p> <p>I expected that clicking either button would cause a partial-page update for UpdatePanel1, that IsInAsyncPostBack would be true, and that " - Async!" would be appended to Label1.</p> <p>Any idea why IsInAsyncPostBack is always false?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload