473,796 Members | 2,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Master Pages and Themes not working

I am using ASP .NET 2.0, VS2005 Professional RTM.

I added a master page to my web application and made my default page refer
to it. I then proceeded to theme some elements in the master page.
Everything worked great. When I then went to my login page and had it refer
to the master page as well things started going wrong.
I attempt to run my application and get directed to the login page. The
login page is missing all the "themeing" from the master page portion. For
example, one of the skins contains the path to the logo image. The link
shows up broken. However, if I look at the source of the web page the path
is in there and it is correct.
If I proceed to login in I get to my default page and everything is fine.
If I click the back button the login page shows up as it should.
I have the theming set up from the web.config file.

Any ideas?

Chris
Nov 20 '05 #1
2 1853
Yep, you need to allow anonymous access to the App_Themes directory via a
<location> element:

<location path="App_Theme s">
<system.web>
<authorizatio n>
<allow users="*" />
</authorization>
</system.web>
</location>

-Brock
DevelopMentor
http://staff.develop.com/ballen
I am using ASP .NET 2.0, VS2005 Professional RTM.

I added a master page to my web application and made my default page
refer
to it. I then proceeded to theme some elements in the master page.
Everything worked great. When I then went to my login page and had it
refer
to the master page as well things started going wrong.
I attempt to run my application and get directed to the login page.
The
login page is missing all the "themeing" from the master page portion.
For
example, one of the skins contains the path to the logo image. The
link
shows up broken. However, if I look at the source of the web page the
path
is in there and it is correct.
If I proceed to login in I get to my default page and everything is
fine.
If I click the back button the login page shows up as it should.
I have the theming set up from the web.config file.
Any ideas?

Chris

Nov 20 '05 #2
Thanks that did it.
After rereading my post it seems so obvious that I should have checked that
based on the symptoms.

"Brock Allen" wrote:
Yep, you need to allow anonymous access to the App_Themes directory via a
<location> element:

<location path="App_Theme s">
<system.web>
<authorizatio n>
<allow users="*" />
</authorization>
</system.web>
</location>

-Brock
DevelopMentor
http://staff.develop.com/ballen
I am using ASP .NET 2.0, VS2005 Professional RTM.

I added a master page to my web application and made my default page
refer
to it. I then proceeded to theme some elements in the master page.
Everything worked great. When I then went to my login page and had it
refer
to the master page as well things started going wrong.
I attempt to run my application and get directed to the login page.
The
login page is missing all the "themeing" from the master page portion.
For
example, one of the skins contains the path to the logo image. The
link
shows up broken. However, if I look at the source of the web page the
path
is in there and it is correct.
If I proceed to login in I get to my default page and everything is
fine.
If I click the back button the login page shows up as it should.
I have the theming set up from the web.config file.
Any ideas?

Chris


Nov 20 '05 #3

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

Similar topics

14
2407
by: multiformity | last post by:
So I have been working on an opensource project for a while, and decided to really try to make it look better after focusing on the functionality most of this time. Up to now, I have simply used a standard ASPX page with minor modifications to it. All of my pages inherit from a "BasePage.cs" class, that handles common things like getting the user's information out of the session, determines if a page should or should not be password...
7
3509
by: sasquatch | last post by:
Hi, I've a a site with nested master pages and content pages. I tried using a theme with a stylesheet in the app_themes directory referencing it in the web.config file from a pages tag theme attribute. This works for the content pages, but it doesn't seem able to apply the styles to the top master page even though I did set the master head tag to runat server. Is this by design? If so, what is the best way to apply styles to the top...
1
1535
by: Ryan Ternier | last post by:
I have just started playing around with ASP.NET 2.0 and have a few questions I couldn't get answers to on the net. If anyone could help me with these it'd be awesome. --- Themes - THey seem to lack full functionality with CSS files. I have a theme set up. Inside that theme I can have 32 CSS files. Each file is for each page within that theme. Why? I find it easier having multiple small CSS files to work with rather than a few HUGE...
1
1339
by: Seefor | last post by:
I may be missing something, but why aren't master pages part of themes? i.e. why don't they go in the App_Themes or global Themes directory, and be referenced just by name (not full path) in the declaration for a page? That way, you can change the complete layout by just applying the theme to a page or a whole site. I know that if your master pages are XHTML, then you can change the layout significantly with CSS, but there are...
3
7067
by: johannblake | last post by:
I'm reading up on Themes and Master Pages in ASP.NET 2.0 but I cannot seem to understand what the difference between the two are. Do Master Pages essentially end up doing what Themes do? Is Themes an older part of the .NET architecutre and simply included for backward compatibility or are Themes and Master Pages two different things meant to compliment each other? Can someone give me some insight please.
1
1365
by: sbelgrave | last post by:
First off. Hats off to MS to really doing a good job of major fixes on VS 2K5. It is really a lot better. I have begun using Master Pages with Themes but am a bit confused as to how to make the CSS styles in those themes appear during development (not at run time, i know that most forums explain the css files in the themes are merged 'at run time' to make the page you view). I want to use Master Pages w/ Themes but if sadly I feel the...
6
4170
by: Just Me | last post by:
When using master pages, how can I get an external style sheet applied to the specific page and still see the effects at design time. I want to have a generic style sheet and specific ones for each page. The only way I can think to do this is to put a link tag in the master with a specific ID but leave the source blank. When the page loads it gets the tag from the master and then adds the src attribute, the problem is that you cannot see...
4
1625
by: Stacey Levine | last post by:
I am trying to develop an intranet site and thought I would use Master Pages and themes. I found the the MS templates at http://msdn2.microsoft.com/en-us/asp.net/aa336613.aspx and was trying to set everything up. I created a Master page with three containers: header, content, footer. I created another page and put a few things in the content container. I set the theme option in the web.config. It appears to be applying the theme to the...
6
3502
by: Homer J. Simpson | last post by:
Hi all, I have enough experience with HTML/classic ASP to get by, and I'm trying to learn ASP.NET. Traditionally, I've taken the habit of breaking out extra-long CSS files into multiple, smaller ones, and referring to them in my HTML/ASP files on an as-needed basis. Essentially, I've organized things as: /default.asp
8
1901
by: Jonathan Wood | last post by:
I want to dynamically set my site's theme based on a setting stored in my database. I just hooked this up but get an error that the theme can only be set in the page's PreInit event or earlier. However, it appears that Master pages do not have PreInit events. I REALLY do not want to have to stick the same code in each and every page I create. How are you folks dynamically setting themes from master pages?
0
9684
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10236
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...
1
10182
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9055
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
7552
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
5577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
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.