RaisePostBackEvent and RegisterRequiresRaiseEvent


You do not have to call Page.RegisterRequiresRaiseEvent() in order for IPostBackEventHandler.RaisePostBackEvent() event to be called. In fact calling Page.RegisterRequiresRaiseEvent() will interfer with all other controls on the page that need post back events. The only way calling Page.RegisterRequiresRaiseEvent() actually works is if that is the only control on the page. GridView doesn't have to call Page.RegisterRequiresRaiseEvent().

However, implementing just IPostBackEventHandler isn't good enough, you need to implement: IPostBackDataHandler also on your control. If you don't then IPostBackEventHandler.RaisePostBackEvent() will never be called.



Popular posts from this blog

Yet once more into the breech (of altered programming logic)

Simple WP7 Mango App for Background Tasks, Toast, and Tiles: Code Explanation

How to convert SVG data to a Png Image file Using InkScape