Username_null
Username_null

Reputation: 1315

ASP.net How to enable a theme

I have a basic question that I can't seem to resolve using Google (Or I'm using the wrong combination of keywords).

I Have an application of which I have access to the Masterpages and the ASPX. I don't have access to the code behind; Within that application I have a theme folder and a skin that I have created.

I have attempted to skin a Treeview and have added the following to the control on the aspx document SkinId="trview" (the name of the skin file without the extension).

This alone is not affecting the resulting output. I seem to remember that there is a line of code that should be added to the masterpage to tell the application to use the theme but I can't seem to find what it is.

Any advice would be appreciated.

Upvotes: 0

Views: 787

Answers (2)

AGuyCalledGerald
AGuyCalledGerald

Reputation: 8150

You cannot set the theme in the masterpage, but in the web.config of the application

<system.web>
  <pages theme="myTheme">
</system.web>

or in the page directive of your page using the masterpage

<%@ Page Theme="myTheme" %>

Upvotes: 1

Mubarek
Mubarek

Reputation: 2689

For all webforms, go to web.config, and edit the <pages> tag

    <pages theme="Theme1">
      ......

Remember: Theme is not skin file, skin files are contained in themes

Upvotes: 0

Related Questions