Working with DataBinding and Page_Load in ASP.NET MVP

Posted by Joel on Stack Overflow See other posts from Stack Overflow or by Joel
Published on 2010-04-09T20:20:48Z Indexed on 2010/04/09 20:23 UTC
Read the original article Hit count: 413

Filed under:
|
|
|

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.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about mvp