How best to deal with dynamic page settings in a C# ASP.NET web application?
<p>I have a single page that has a number of controls configured a certain way depending on some condition (e.g. if it is a user accessing the page or an admin). How I currently achieve this is by having an interface for the settings which are common to all pages, and then extending classes which implement the properties specific to the type of user.</p>

<p>For example:</p>

<pre><code>public interface Display_Type
{
    string backgroundColor { get; }
}

public class AdminPage : Display_Type
{
    string backgroundColor { get { return "orange"; } }
}

public class UserPage : Display_Type
{
    string backgroundColor { get { return "blue"; } }
}
</code></pre>

<p>And my page's codebehind:</p>

<pre><code>public partial class MyPage : System.Web.UI.Page
{
    Display_Type pageSettings;

    protected void Page_Load(object sender, EventArgs e)
    {
        if ((bool)Session["Is_Admin"])
        {
            pageSettings = new AdminPage();
        }
        else
        {
            pageSettings = new UserPage();
        }

        // ...

        string backgroundColor = pageSettings.backgroundColor;
        // ... Do stuff with background color
    }
}
</code></pre>

<p>This works fine for me, but since these settings are constant across the application, they seem to make more sense as static classes. However, I'm having trouble figuring out how to do this because I can't assign a static class to a variable.</p>

<p>My questions are:</p>

<ol>
<li>Is there a better way I can accomplish what I'm trying to do here?</li>
<li>Or, if this is okay, how could I accomplish what I'm doing with static classes / members?</li>
</ol>

<p>It may be worth noting that the user/admin example is not how I'm using this structure in my web application, and in fact has nothing to do with the user themselves but rather other factors such as request parameters.</p>
