title: Determine which UpdatePanel causes the partial (asynchronous) PostBack?
body: <p>In a page contains two <code>UpdatePanels</code>, How can I know which <code>UpdatePanel</code> causes the partial <code>PostBack</code> ?</p>
  
  <p>I mean in the <code>Page_Load</code> event handler.</p>
  
  <p>This is my code:</p>
  
  <pre><code> &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
   &lt;/asp:ScriptManager&gt;
   &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" 
       onprerender="UpdatePanel1_PreRender"&gt;
       &lt;ContentTemplate&gt;
           &lt;A:u1 ID="u1" runat="server" /&gt;
       &lt;/ContentTemplate&gt;
   &lt;/asp:UpdatePanel&gt;
   &lt;asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" 
       onprerender="UpdatePanel2_PreRender"&gt;
       &lt;ContentTemplate&gt;
           &lt;A:u2 ID="u2" runat="server" /&gt;
       &lt;/ContentTemplate&gt;
   &lt;/asp:UpdatePanel&gt;
  </code></pre>
  
  <p>I tried this code, but it isn't worked alost!</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      if (ScriptManager.GetCurrent(Page).IsInAsyncPostBack)
      {
          if (UpdatePanel1.IsInPartialRendering)
          {
              // never enter to here
          }
          if (UpdatePanel2.IsInPartialRendering)
          {
              // neither here
          }
      }
  }
  </code></pre>
  
  <p>Any help!</p>