469,572 Members | 1,336 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

Re: Referencing a Theme

I am having trouble referencing a theme in my ASP.NET project.

I was following a model that allowed for multiple themes. So The theme that
I have is stored in named "Base" under the App_Theme folder that is stored
at the root of my project folder.

It is really the one I want to use for all pages, so I thought I would
reference it in the web.config file:

<pages masterPageFile="~/Masters/SiteTemplate.master"
theme="~/App_Theme/Base/" />

I have tried reference with and without the final slash and with and without
the beginning tilde. I have tried tried referencing the css file named
Default.css.

None of these have worked. What am I doing wrong?

Example error messages:

Error 1 Theme '/App_Theme/Base/Default.css' cannot be found in the
application or global theme directories. D:\Projects\MyAPP\Web.config 14
Error 2 D:\Projects\MyAPP\Default.aspx: ASP.NET runtime error: Theme
'/App_Theme/Base/Default.css' cannot be found in the application or global
theme directories. (D:\Projects\MyAPP\web.config line 14)
D:\Projects\MyAPP\Default.aspx 1 1 D:\Projects\MyAPP\


Jul 8 '08 #1
1 2181
You don't need to specify the full path to the theme, just specify the theme
name.

<pages theme="Base"

"Henry Stock" <he***@henry-stock.comwrote in message
news:ua****************@TK2MSFTNGP05.phx.gbl...
>I am having trouble referencing a theme in my ASP.NET project.

I was following a model that allowed for multiple themes. So The theme
that I have is stored in named "Base" under the App_Theme folder that is
stored at the root of my project folder.

It is really the one I want to use for all pages, so I thought I would
reference it in the web.config file:

<pages masterPageFile="~/Masters/SiteTemplate.master"
theme="~/App_Theme/Base/" />

I have tried reference with and without the final slash and with and
without the beginning tilde. I have tried tried referencing the css file
named Default.css.

None of these have worked. What am I doing wrong?

Example error messages:

Error 1 Theme '/App_Theme/Base/Default.css' cannot be found in the
application or global theme directories. D:\Projects\MyAPP\Web.config 14
Error 2 D:\Projects\MyAPP\Default.aspx: ASP.NET runtime error: Theme
'/App_Theme/Base/Default.css' cannot be found in the application or global
theme directories. (D:\Projects\MyAPP\web.config line 14)
D:\Projects\MyAPP\Default.aspx 1 1 D:\Projects\MyAPP\

Jul 9 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Miguel Dias Moura | last post: by
4 posts views Thread by Ben | last post: by
3 posts views Thread by dvan | last post: by
1 post views Thread by Ron | last post: by
2 posts views Thread by Redhairs | last post: by
4 posts views Thread by Neil Jones | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.