Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
Changing Default styleSetName for all Pages at Runtime
posted

I have set up a site wide default style set name by putting entries in the config file and it works fine.  Now I want to allow the user to change their site wide style sets at run time and override this default in C# code.  Any ideas?  Here is what I use in my config file to set the default:        

<section name="infragistics.web" type="System.Configuration.SingleTagSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

<infragistics.web styleSetPath="~/Styles/" styleSetName="ElectricBlue" />

 Thanks

Parents
  • 19308
    posted

    You can modify the current StyleSet dynamically through code.  Take a look at the Application Styling topic in the help file. 

    The trick is associating an application style with an entire domain.  That can be done through a Browser cookie.  If you add a cookie for your domain and store a value in there that corresponds to the application style the user chose, you can set the application style based on that cookie value, when each one of your applications loads. 

    Hope this helps,

    -Tony

Reply Children