473,388 Members | 1,224 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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 2349
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Miguel Dias Moura | last post by:
Hello, I am creating a master page for a web site. All pages created from this master page will use the same theme. However I am not able to add the theme in my master page. Why is that? ...
4
by: Ben | last post by:
Hi, I'm using images in my menu control. I have my menu setup based on this example: http://msdn2.microsoft.com/en-US/library/system.web.ui.webcontrols.menuitembinding.imageurlfield(VS.80).aspx ...
3
by: dvan | last post by:
I've created a theme Css for my Asp.net 2.0 web application. The web.config Pages Theme key is set to the theme name. Everything seams to work fine except for any page that I want to disable the...
1
by: Joey | last post by:
Hello, I have tried to programmatically set the theme for my master page by putting code in a "Page_PreInit" fuction in the master page's code behind. However, when I set a breakpoint there and...
1
by: Ron | last post by:
I have an application that requires a login at each visit to the site and can only be accessed by a login. A user can have different themes depending if it was assigned in there profile. Theme...
0
by: vikramp | last post by:
Hi, I am storing theme in web.config using <pages theme="mytheme"/>. I am then using the following code to read it from my webpage: Configuration config =...
11
by: greg | last post by:
Hi all, Is there a way to get the current theme name at design time? I'm trying to write a custom control for which I need to use images from the current theme. I have asigned a theme to the...
2
by: Redhairs | last post by:
The theme item(images,css,skin file) of each theme are under single theme folder of App_Theme. if there are some css or image files which are shared and used by every/some theme, where should I...
4
by: Neil Jones | last post by:
Hello, I would like to create my own theme(s) for a couple of my own blog sites. I am hoping a few better themes could bring lot more readers. So far, I have stayed with the default wordpress...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.