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
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