title: Force Full Postback programmatically from UpdatePanel
body: <p>I have a GridView in an update panel. It's an inherited asp:GridView, so it has a little "export me" icon which does just that. It works by responding to an "export" click with an XLS file. The problem is that if you put the smart GridView inside an update panel, ASP.NET thinks the XLS file is to be written into the panel, which is obviously not what we want. For this, I need a full post-back every time.</p>
  
  <p>My update panels are all programmatically generated</p>
  
  <p>Solutions which don't work in this precise scenario (many of which are covered elsewhere on SO):</p>
  
  <ol>
  <li><p>In ASP.NET before version 4, if you left the ID off a control it would do a full postback even from within an update panel. My question is for the latest and greatest .NET 4 only.</p></li>
  <li><p>ScriptManager.RegisterPostBackControl looks promising. It does make the control post-back use the correct panel ID as the eventtarget, but doesn't otherwise help.</p></li>
  <li><p>Adding a PostBackTrigger to the Update panel. My update panels are generated programmatically, and MS state that this is not supported. My tests indicate that they're right: I tried it every way, but this does not work.</p></li>
  <li><p>I don't really like the idea of the smart GridView having to break out from itself, but I tried to make it put an extra control outside the updatePanel in these circumstances. The idea being to make a client-side click on my export button inside the panel be redirected by client javascript to simulate a click on that button outside the panel. However this doesn't work because I can't apparently add the "outside" control to the page - I get the "The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases." error.</p></li>
  <li><p>Using jQuery to shift the "export" control outside the panel. MS must have some list of controls which they think are "in" the panel, and the physical location within the DOM doesn't matter.</p></li>
  </ol>
  
  <p>Does anyone have any ideas how to make that work? I know a lot of this <em>should</em> work, but that's not quite the same thing.</p>