My aspx pages pages are drived from a base class, my base class creates the dynamic header of my website. I have a method called “genMenu” and i call in within pageLoad event of base class to create menu.
In some pages i need to override this method, however as we know page load of base class fires before the pageLoad of drived pages. So i cant really do that.
So how can i override the genMenu in aspx page and NoT fire it within base class. I know i can manually call the genMenu function in all drived pages, and not call it within pageLoad of base class, but there has to be a better way of handling it.
Create a virtual method called
GenerateMenuor something like that, and always call it from the base page. Do the actual work there. Then your derived pages that need to intercept it can override that instead.E.g., something like this:
And: