D
David W
I have a pretty simple page with a GridView, a DropDownList as a filter to
the GridView, and a filter Button. Both gridview and dropdownlist are bound
to SqlDataSources. I am setting another parameter in the Selecting event of
the datasource, but the strange thing is the order of the events that fire.
When I first enter the page the event order is:
Page_Init
Page_Load
SqlDataSource.Selecting
But when I press the filter button and get a postback, the event order
changes to:
Page_Init
SqlDataSource.Selecting
Page_Load
Why would this happen? There are things that have to happen in the
Page_Load before the Selecting event happens. Its very disturbing that I
can't count on the life cycle of the page to be consistant...
the GridView, and a filter Button. Both gridview and dropdownlist are bound
to SqlDataSources. I am setting another parameter in the Selecting event of
the datasource, but the strange thing is the order of the events that fire.
When I first enter the page the event order is:
Page_Init
Page_Load
SqlDataSource.Selecting
But when I press the filter button and get a postback, the event order
changes to:
Page_Init
SqlDataSource.Selecting
Page_Load
Why would this happen? There are things that have to happen in the
Page_Load before the Selecting event happens. Its very disturbing that I
can't count on the life cycle of the page to be consistant...