MasterPage Page_Load hits before Grid_ItemCommand

Posted by Raheel Khan on Stack Overflow See other posts from Stack Overflow or by Raheel Khan
Published on 2012-06-17T09:09:04Z Indexed on 2012/06/17 9:16 UTC
Read the original article Hit count: 256

Filed under:
|
|
|
|

I am using the session object to store success/error messages based on user actions.

On each postback, the message is set on ItemCommend and retrieved on the Page_Load of the master page. Once retrieved, the message is deleted from the session.

The problem is that the master page's Page_Load gets called before the ItemCommand gets called so the message does not show up until the next refresh or postback.

How is this situation normally handled? Is there some other event we can code against?

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET