For whatever reason, Visual Studio does not offer an intuitive procedure for stubbing out an .aspx page’s event handlers.
The easiest procedure that I can come up with is:
- View the .aspx page in Code View
- Within the page’s class, create a method using the override modifier. Visual Studio’s Intellisense will display the list of the classes members that can be overridden.
Note how the overridden event handler in the above example is named OnPreRender(). It’s worth noting that this method is the same as the Page_PreRender() event handler.