473,739 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ma ster"
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\MyA PP\Web.config 14
Error 2 D:\Projects\MyA PP\Default.aspx : ASP.NET runtime error: Theme
'/App_Theme/Base/Default.css' cannot be found in the application or global
theme directories. (D:\Projects\My APP\web.config line 14)
D:\Projects\MyA PP\Default.aspx 1 1 D:\Projects\MyA PP\


Jul 8 '08 #1
1 2364
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******** ********@TK2MSF TNGP05.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.ma ster"
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\MyA PP\Web.config 14
Error 2 D:\Projects\MyA PP\Default.aspx : ASP.NET runtime error: Theme
'/App_Theme/Base/Default.css' cannot be found in the application or global
theme directories. (D:\Projects\My APP\web.config line 14)
D:\Projects\MyA PP\Default.aspx 1 1 D:\Projects\MyA PP\

Jul 9 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2297
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? Do I need to add the theme on the top of each page I create from this master page?
4
3410
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 I have a theme and right now, the theme structure looks like... App_Themes --Authenticated ----Images ------Menu
3
2874
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 master theme and apply another stylesheet.css. According to the documentation I've read. I should be able to disable the theme by setting the "enabletheming" attribute on the aspx Page to false. This doesn't seam to work. When I look at the...
1
8003
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 run the app, the breakpoint is never hit. Of course my theme is not being applied. The above procedure works fine for any content page, but obviously doesn't work for my master page. So, how does one properly and programmatically set a theme...
1
1758
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 A is considered the default theme for the site But different users can have different themes. User A has Theme A User B has Theme B Logs in sees Theme A During Login sees Theme A after login sees Theme B
0
2223
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 = WebConfigurationManager.OpenWebConfiguration("~"); PagesSection section = (PagesSection)config.GetSection("system.web/pages"); string currenttheme = section.Theme;
11
6529
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 page as well as in the web.config. The control looks ok at run time but when viewed in the Visual Studio designer it cannot pick up the current theme.
2
1438
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 put them ?
4
4244
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 theme (blue title). There are a lot of web sites I have seen that have very attractive themes. I am not a programmer and do not like to edit the php files or css files etc. My preference is to visually create the theme (font,images,background...
0
9341
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9211
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8216
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6756
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6056
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4826
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3282
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2195
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.