Working with DataBinding and Page_Load in ASP.NET MVP
- by Joel
I'm using WebForms MVP to create some simple reporting applications. Most of these applications consist of a few search criteria inputs and a ComponentArt datagrid that I'm populating with data from the database.
Most of the markup is in a UserControl, which is in a content page with a master page. My problem is that the control's Page_Load event is firing before the control events that caused the postback in the first place. Basically, the user clicks the search button, and Page_Load is fired BEFORE Search_Click. This is messing with the databinding scheme I've been using.
So that's the question: Why is my Page_Load event firing before the event handler, and what can I do about it? I don't THINK this problem is related to WebForms MVP or ComponentArt, but obviously I could be wrong.
Thanks.