CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 7/31/2007 2:09:33 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 18 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
bertino12
Asp.Net User
Printing in master pages7/31/2007 2:09:33 PM

0/0

I am using master pages that have links and a banner. I have a content page and I want to just print out a <div> in the master page. I have checked out a few tutorials on it, but since im using a master page I am having a hard time excluding all the master page elements(links, banner) when printing. I linked the stylesheet on the master page.

 How can i print out the <div> on my content page without printing out the master pages banner and links?

 Thanks a bunch,

This is my content page:

 

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Sheet.aspx.vb" Inherits="Project.Sheet" masterpagefile="~/Site.master" smartnavigation="True"%>

<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="server">
    <div style="text-align: center" class="PrintThis">
        <table>
            <tr>
                <td>
                    test
                </td>
            </tr>
        </table>
    </div>
    
    <a href="#" onclick=" window.print(); return false">Print this page</a>
</asp:content>
 
DarrellNorton
Asp.Net User
Re: Printing in master pages7/31/2007 2:25:25 PM

0/0

You can disable the Master Page in the PreInit event of the page.  Check out this article for details and a code sample.

Darrell Norton, MVP
My Blog on CodeBetter
naturehermit
Asp.Net User
Re: Printing in master pages7/31/2007 2:51:34 PM

0/0

Well the way i do it, is to create properties in master page.

public System.Web.UI.AttributeCollection SomedivAccess

{

   get {return somediv.attributes}    //some div is the masterpage div..which sets all header etc stuff..for...eg.

}

in actual content page before printing

you can clear this attributes like so

MyMaster myMast = (MyMaster)(page.Master);

myMast.SomedivAccess.clear()

its only an example to show you how it can be done.

The otherway sites do it..is..like for e.g. google etc is they have a link to a page which is without styles etc ..try printing in gmail for e.g. or bbc

 


Please Mark Post that helped you as answer, also include a summary of what solved the problem as it helps others in similar situations
Adam.Kahtava
Asp.Net User
Re: Printing in master pages7/31/2007 3:14:15 PM

0/0

Another alternative would be to use a Print Media type with a Style Sheet that hides your banners etc.. and only shows your content. Take a look at this article: The Problems with Themes, Skins, and Cascading Style Sheets (CSS) in ASP.NET 2.0 ? Creating Printer Friendly Pages (defining a CSS Print Media Type) with CSS While Using Themes (Work Around #5)

Your Style Sheet would probably look something like this:

    #banner, #advertisement { display: none; }

    #content { margin: 0px; } 

 


-Adam Kahtava [http://adam.kahtava.com]
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Real World Quarkxpress 5: For Macintosh and Windows Authors: David Blatner, Pages: 1032, Published: 2002
Using PageMaker: Macintosh Version Authors: C. J. Weigand, Pages: 450, Published: 1990
InDesign Production Cookbook: 169 Easy-to-follow Recipes for Graphic Designers and Desktop Publishers Authors: Alistair Dabbs, Ken McMahon, Anne-Marie Concepcion, Keith Martin, Pages: 192, Published: 2005
Using QuarkXPress 6 Authors: Suzanne Sayegh Thomas, Pages: 480, Published: 2004
Desktop Publishing with Pagemaker for the IBM PC AT, PS/2, and Compatibles: For the IBM PC AT, PS/2 and compatibles Authors: Tony Bove, Cheryl Rhodes, Pages: 222, Published: 1987
Mastering InDesign CS3 for Print Design and Production: for print design and production Authors: Pariah S. Burke, Pages: 492, Published: 2007
Aldus PageMaker: Apple Macintosh & Microsoft Windows Authors: Aldus Corporation, Aldus Corporation, Pages: 467, Published: 1993
Adobe PageMaker 7.0: Classroom in a Book Authors: Adobe Systems, Adobe Creative Team, Pages: 324, Published: 2001
Desktop Publishing with Pagemaker 3.0: IBM PC AT, PS/2, and Compatibles Authors: Tony Bove, Cheryl Rhodes, Pages: 249, Published: 1989

Web:
Printing in master pages - ASP.NET Forums I am using master pages that have links and a banner. I have a content page and I want to just print out a
in the master page. ...
To use master pages in a form intended for double-sided printing You can use master pages for the odd (front) and even (back) sides of a form intended for double-sided printing. For example, you may want the page numbers ...
Quark: Master pages: Frequently asked questions A master page is a non-printing page in a QuarkXPress layout that is used to format layout pages automatically. Typically, master pages contain items such ...
Shane Perran’s SharePoint Customization Blog » Blog Archive » CSS ... CSS + Master Pages + Printing. The project I am currently working on has tossed me into the deep-end of Visual Studio 2005 and Master Pages. ...
CSS + Master Pages + Printing « Gylsheaven CSS + Master Pages + Printing. Posted by gylsheaven on October 10, 2007. “The project I am currently working on has tossed me into the deep-end of Visual ...
DevASP.Net Creating print preview page dynamically in ASP.NET ... Creating print preview page dynamically in ASP.NET Master Pages Directory of ASP .NET, VB.NET, C#, XML and SQL resources, articles, samples, tutorials, ...
Creative Curio » InDesign Project — Bleed and Layering Master Pages Professional print shops actually print your projects on paper larger than the .... on the idea of layering master pages. Sorry this is a little out of the ...
Peachpit: Working with FrameMaker’s Master Pages > Pages with a ... Master pages are non-printing pages. Reference Pages — Reference pages are non- printing pages. They have a few important jobs in FrameMaker, such as storing ...
Mastering Master Pages | CreativePro.com Feb 4, 2008 ... The first thing to consider before you start using Master Pages for .... Printing: Web To Print Software | Web To Print | Print On Demand ...
Designing Print Documentation:FrameMaker Tutorial--Master Pages The following FrameMaker tutorial will guide you through the steps of creating master pages. If you see any errors or think we should have included other ...

Videos:
My first video!! This is my summer tribute and my first vid ever!! yay! Songs:Seasons in the sun by:cat stevens piano man by:billy joel Pictures:...
Make learning English your hobby, Free ebook. http://www.2tion.com Download free Spoken English Training Kit. Spoken English is an urgent requirement and an essential skill set to possess in th...
The Tao of Kung Fu #22 - "Look beyond the letter of the law". Learn more about this philosophy here..... This video is from the "Empty Pages of a Dead Book" episode, from the 1970's TV series "Kung Fu". Here we...
Authority Video On (How To Market Yourself) http://masteryofmindset.com How To Market Yourself is easy! Market Yourself: Tips for High-Tech Consultants How to find quality consulting clients ea...
Blackjack - trailer Meet the mysterious Dr. Black Jack - an unlicensed master surgeon whose astoundi Meet the mysterious Dr. Black Jack - an unlicensed master surgeon wh...
FELIX ALL PUZZLED (1924) Felix the Cat Like Alice's cat Julius, Felix mixes it up with the Russians when his master won't feed him his milk until he solves a crossword puzzle. The question...
Gospel of Truth-5:Living Book, Al-Kitab, of God is personal. Gospel of Truth Part 5:- Gospel of Truth Part 5:In their heart, the living book of the Living was manifest, the book which was written in the thoug...
Charlie Rose - Media Coverage of the war in Iraq / Eduardo Galeano Segment 1: A panel on media coverage of the war in Iraq with guest host Mary Matalin, former counselor to Vice President Cheney. She talks to Michae...
Exposition of the Parables-36 Matt.10.22-33.Carrying Cross. Exposition of Matt. 10.23-33:- But when they persecute you in this city, flee ye into another: for verily I say unto you, Ye shall not have gone over...
I'm selling it on ebay Al Baker was one of the most creative figures in magic, a master of close-up, stage magic and mentalism. Now ALL of his legendary works are back in p...




Search This Site:










nested wizard control: having sub-steps in a 2.0 wizard control

treeview not visible

positioning issues

need a sitemap link to open in a new window

using the dynamicitemtemplate

web.sitemap required by xmlsitemapprovider

accessing contnet page's control in the javascript code of master page

how can i apply custom images to my sitemap

asp:menu - arrow pushes centered menu text

menu in vs2005 express edition

masterpage problem.image in masterpage not shows in childpages

multiview and treeview -- can't find selectednode

is it possible to update the control at server-side ?

tree view sitemap nodes

how to make panel 'visible' programmatically using findcontrol

how to dynamically update and expand/focus a node in treeview asp.net 2.0 ?

css style to content placeholder on master page -- urgent

problem with themes and gridview

masterpage and stylesheets

working with asp:menu 2005. can u help me?

outcache problem about masterpage.master and google ad

building menu.navigateurl based on user selection

external stylesheet on a content page

need some help with menu

can't add master pages to my project!

treeview question

advanced menu creation

invalid theme or stylesheet theme value.

adding controls programatically to master pages

why the findcontrol doesn't find a control in page that have masterpage?

  Privacy | Contact Us
All Times Are GMT