I have a pretty straightforward pair of aspx pages that were working just fine until last night. The first page has a form that posts to itself, updates some values in a session object, then calls Response.Redirect to the second page. The second page loads a datagrid from the session object. It was working fine yesterday, so I'm pretty sure all the databinding logic is correct. But now not only is it not loading the datagrid, it never hits a breakpoint I put on the second page's Page_Load method. This is true whether I use Response.Redirect, Server.Transfer, or even if I reload the page or type its url directly. It never hits the breakpoint--as soon as it hits the page, it renders the static parts of the page without the DataGrid. I put a breakpoint in the previous page immediately before the Response.Redirect and tried to step into it, but again, the browser immediately renders the rest of the page without stepping through in the debugger. What could have gone wrong with my configuration that Page_Load wouldn't get called? I reverted the specific files in question back to the version that was working yesterday, but it doesn't work now, so something must have changed somewhere else. Is that possible? Where do I look??

Thanks very much in advance! I'm stumped.

OK, I found a solution to my problem, but since I had to comb a LOT of message boards to find it, I thought I'd repost it here. Here's a link to the message board that gave me the answer:


Basically, Visual Studio designer deleted the entire body of the initializeComponents method, including the all-important line

this.Load += new System.EventHandler(this.Page_Load)

That left my page entirely useless. I have no idea why the IDE decided to perform this useful task for me, but in case it ever chooses to help you out in the same way, just paste the above event handler back in.