V
Victor Rodriguez
Is there a way to present just the content of a page and turn off the master
page by code?
thanks,
Victor
page by code?
thanks,
Victor
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Is there a way to present just the content of a page and turn off the
master page by code?
Ken Cox said:Hi Victor,
What I did was create a stripped down 'printfriendly.master' page that
does away with all the regular page content.
You can hook up it up to a Print Friendly image button by passing a
querystring parameter like ?pf=1 to invoke the printer friendly master
page:
protected void Page_PreInit(object sender, EventArgs e)
{
if (Request["pf"] == "1")
{
Page.MasterPageFile = "printfriendly.master";
}
}
Let us know if this helps?
Ken
Microsoft MVP [ASP.NET]
Victor Rodriguez said:I'm looking for a a way to have a page without the master in order to
print the page without all the stuff on the master. Do you have a better
way for this?
thanks,
Victor
Ken Cox said:Hi Victor,
What I did was create a stripped down 'printfriendly.master' page that
does away with all the regular page content.
You can hook up it up to a Print Friendly image button by passing a
querystring parameter like ?pf=1 to invoke the printer friendly master
page:
protected void Page_PreInit(object sender, EventArgs e)
{
if (Request["pf"] == "1")
{
Page.MasterPageFile = "printfriendly.master";
}
}
Let us know if this helps?
Ken
Microsoft MVP [ASP.NET]
Victor Rodriguez said:I'm looking for a a way to have a page without the master in order to
print the page without all the stuff on the master. Do you have a better
way for this?
thanks,
Victor
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.