How do i change Skin in my webiste like Telerik Demo

2 posts, 0 answers
  1. Murugesan Jambukesan
    Murugesan Jambukesan avatar
    12 posts
    Member since:
    Sep 2009

    Posted 24 Sep 2015 Link to this post

    Hi,

    I want to change skin file in my website without affect web.config file. now i declare  <appSettings><add key="Telerik.Skin" value="WebBlue" /></appSettings>. In this case i am not able to change skin without affecting web,config file. if any changes done in web.config file the website should logout. i want this feature?

    Please help anyone ASAP,

     

    Thanks,

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 29 Sep 2015 Link to this post

    Hello,

    You can use a RadSkinManager, e.g.:

    <telerik:RadSkinManager runat="server" ID="RadSkinManager1"></telerik:RadSkinManager>
    <telerik:RadTextBox ID="RadTextbox1" runat="server" Text="Black" />
    <telerik:RadButton ID="RadButton1" runat="server" Text="Change skin" OnClick="RadButton1_Click" />
    protected void RadButton1_Click(object sender, EventArgs e)
    {
        RadSkinManager1.Skin = RadTextbox1.Text;
    }

    and you can additionally store the desired value in a file, database, the Session, the Cache, the ViewState, a querystring, a hidden field, whatever fits your preferences and needs. 

    OR, you can use the standard .NET approach for setting AppSettings keys that does not need a SkinManager control:

    protected void RadButton1_Click(object sender, EventArgs e)
    {
        ConfigurationManager.AppSettings["Telerik.Skin"] = "Silk";
    }


    Regards,

    Marin Bratanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top