views:

7

answers:

0

I'm using asp.net MVC2 and trying to select css file based on a setting. Index controller gets it from web.config

Dim vCountryCode As String = ConfigurationManager.AppSettings(MyAppConstants.DEFAULTCOUNTRYCODE.ToString)

SessionHelper.SetCountryCodeSession(vCountryCode)

site.master looks like this:

<% Dim CountryCode As String = Me.Session("CountryCode")%>


    <head id="Head1" runat="server">
            <link href="/Content/Css/<%: CountryCode %>/Site.css" rel="stylesheet" type="text/css" />

...

Is it possible to do something similar to this?