473,406 Members | 2,633 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,406 software developers and data experts.

Override existing list of master pages?

I have a situation where a particular error page is being redirected to (Server.Transfer) and in most cases it works correctly loading the correct master page and rendering as it should.

In another case, this page is being called as a result of an asp:Xml failure, but the Server.Transfer seems to maintain the existing hierarchy of master pages, and thus the page is framed twice when rendered. (Response.Redirect actually works correctly here but causes other issues I don't have time to get into).

So I normally get (as I should):

Master1/ErrorPage

But sometimes I get:

Master1/Master2/Master1/ErrorPAge

So my question is, how can I clear the existing hierrachy of master pages to have just Master1 when the error page is loaded?

--
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Oct 16 '06 #1
1 1164
I think I might have found a solution for this:

In the OnPreInit() handler I start with: Response.Clear();

If you can think of a reason why this is bad, please let me know. If I find that it doesn't work right, I'll report back.

Thanks.

--
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Oct 16 '06 #2

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

Similar topics

1
by: Sasha | last post by:
Hi all asp.net proffesionals out there, How do you implement master pages in your applications? What libraries do you use and what have been your experience? Sasha
0
by: Mark Parter | last post by:
I've "converted" the code at http://www.eggheadcafe.com/articles/20040613.asp to VB.NET as I'd like to implement this as my application uses quite complex GridViews and various other controls on...
5
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the...
1
by: Alan Silver | last post by:
Hello, I am just experimenting with master pages, and am trying to add a content placeholder in the <head> section, so that individual pages can set their own page title and meta tags. The...
1
by: Carlos | last post by:
I have 3 asp.net pages in a project created later, now I have created a Master Page so my question is how can I tell it to apply the new master pages to existing pages ? Thanks
2
by: Rob Dob | last post by:
Hi, How do I go about installing another Web Site Project inside my existing VS2005 website project. I currently have both a forum WSP and my main WSP application within the same solution. Both...
17
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
13
by: Kirk | last post by:
I have been reading Scott Allen's article on Master Pages (http:// odetocode.com/Articles/450.aspx) but I am having problems understanding a concept. Specifically, I have created a property...
2
by: jessicalgaudette | last post by:
I have been asked to change some background colors in a website that use a masterpage. This only effects 6, with each set of 2 using a different stylesheet of the many web pages, but I am having...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
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...
0
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...
0
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...
0
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,...
0
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...

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.