Solved

Master Page should not be nesting in another master page

Posted on 2009-04-09
4
238 Views
Last Modified: 2013-11-26
I have two master pages in my project. The Master.master has a header at the top which is then applied to all the content pages. Then I have a Print.master which I want to use when I need to print a grid full of data. The Print.master does not have a header so that its only the grid showing - thus the header is not printed.

Now the problem comes when i redirect from a content page that uses Master.master to another content page which uses Print.master. The Print.master and its content page are show inside the Master.master content page as if they were content pages. I have even tried using a normal page instead of the Print.master and its content page, for printing reports, but then that normal page is also only shown inside the Master.master when it should not be shown like that.

Please help!
0
Comment
Question by:Krummelz
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
daveamour earned 55 total points
ID: 24105022
Ok I don't know how to fix your problem but maybe a different approach would be to use css and have print media hide the header.
http://www.digital-web.com/articles/css_styling_for_print_and_other_media/
 
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24105742
How do you redirect? I do not think that if you redirect to a different page then it should show it within the content section of existing master page. Would Response.Transfer help?
0
 
LVL 19

Expert Comment

by:daveamour
ID: 24105748
You mean Server.Transfer, not Response.Transfer
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24105924
Thanks for correcting me daveamour.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now