title: ASP.NET GridView and UpdatePanel
body: <p>I have a <code>GridView</code>, inside a <code>UserControl</code>, inside an <code>UpdatePanel</code> on a page.</p>
  
  <p>There's a <code>Button</code> in the <code>GridView</code> which needs to fire a <code>PostBack</code>. What happens is:
  User clicks <code>Button</code> -> <code>RowCommand</code> Fires -> Custom event is raised on <code>UserControl</code> -> Page detects this and changes the active view index for a <code>MultiView</code> and also the page title and some other controls outside the <code>UpdatePanel</code>.</p>
  
  <p>The problem is, the page posts back asyncchronously, the page title changes, but the actions requiring a full <code>PostBack</code> don't happen because a full <code>PostBack</code> doesn't occur.</p>
  
  <p>To register the button as a <code>PostBack</code> trigger I'm using:</p>
  
  <pre><code>ImageButton btnResults = e.Row.FindControl("btnResults") as ImageButton;
  ScriptManager scrCurrent = ScriptManager.GetCurrent(this.Page);
  if (btnResults != null &amp;&amp; scrCurrent != null) {
      scrCurrent.RegisterPostBackControl(btnResults);
  }
  </code></pre>
  
  <p>I know this is a bit of a complicated problem, but I'd really appreciate any help.</p>