title: What is the basepage equivalent in MVC
body: <p>In my ASP.Net web sites I have the following code that I am able to use site-wide.<br>
  <strong>How do I do the same in ASP.Net MVC2?</strong></p>
  
  <pre><code>public class BasePage : Page
  {
   public BasePage()
   {
      this.PreInit += new EventHandler(BasePage_PreInit);
   }
  
   /// &lt;summary&gt;Every page executes this function before anything else.&lt;/summary&gt;
   protected void BasePage_PreInit(object sender, EventArgs e)
   {
      // Apply Theme to page
      Page.Theme = "Default";
   }
   public bool IsSiteAdmin(string userName)
   {
      if (System.Web.Security.Roles.IsUserInRole(userName, "SiteAdmin1"))
          return true;
      return false;
   }
  }
  </code></pre>