title: URL rewriting, postback doesn't work for controls in master page
body: <p>Bog standard postback stuff going on a la this link: <a href="http://ruslany.net/2008/10/aspnet-postbacks-and-url-rewriting/" rel="nofollow">http://ruslany.net/2008/10/aspnet-postbacks-and-url-rewriting/</a></p>
  
  <p>Adding <code>form1.Action = Request.RawUrl;</code> fixes it as you'd expect, but there is one bug...</p>
  
  <p>I have an ashx which serves a page depending on the parameters. This page, and in fact, all pages, have a Page.master masterpage. On this page is a button, and it is hooked into an onclick event in the codebehind. Clicking this button however does nothing, because the form action code above is breaking it. If I comment it out the button click works fine, but none of my navigation does.</p>
  
  <p>mysite.com/cats/123 is picked up by my ashx using rewrite just like the example up top.</p>
  
  <p>When the button is clicked, the <code>form1.Action = Request.RawUrl;</code> which is in the master page load event fires, and sets the action to <code>mysite.com/cats/123</code> as you'd expect.</p>
  
  <p>At this point the page is served, but the onclick method (which is in the master page) does not fire. Any idea why?</p>
  
  <p>Edit: Maybe my ashx has to do something to preserve the postback data?</p>