My project has been using a base page to hold common page functionality. Its worked until the base page grew to be huge, so I tried to factor the base page into several classes. Then I realized that I can't write
public MyPage : SecurePage, PageWithGridViewSorting, PageWithSessionWarning
given something like:
public class SecurePage : RadAjaxPage
{
// Add session id to ViewStateUserKey
}
public class PageWithGridViewSorting : RadAjaxPage
{
// add sorting to all grids on page
}
public class PageWithSessionWarning : RadAjaxPage
{
// inject javascript to warn user of impending session end
}
Which way am I supposed to take this? And I think the fact that this is the ASP.NET page is relevant because it is a class that gets constructed by the framework, not me. My first thought was to make a override for the constructor and pass in the features and that wont work with System.Web.UI.Page.