This is a migrated thread and some comments may be shown as answers.

How do i change Skin in my webiste like Telerik Demo

1 Answer 7 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 24 Sep 2015, 09:40 AM

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,

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 29 Sep 2015, 07:09 AM

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
Tags
General Discussions
Asked by
Ravi
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or