Master Page should not be nesting in another master page

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!
LVL 5
KrummelzAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
daveamourConnect With a Mentor Commented:
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
 
CodeCruiserCommented:
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
 
daveamourCommented:
You mean Server.Transfer, not Response.Transfer
0
 
CodeCruiserCommented:
Thanks for correcting me daveamour.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.