printer friendly implementation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ST

    #1

    printer friendly implementation

    Hi,

    I'm implementing a printer friendly feature for all the pages on a web site.
    I'm separating the header, content, and footer into separate ascx files,
    which are contained in the main file. In the mail file I have a link button
    which, supposedly, when clicked on, passes the current content page's url and
    page title to the printer friendly page, which has a placeholder for the
    content page. I could do this with session variables, but if I do it this
    way, how do I make a function common to all to accomplish this? I can't use
    a class file with session variables, so I'm trying to post all the content
    pages to the printer friendly page but have had no luck so far. Can I use
    javascript for this? Or can this be accomplished with code behind? Any
    suggestions and/or comments will be greatly appreciated!

    Sorry for the long message and thanks in advance!

    -ST
  • Ravikanth[MVP]

    #2
    RE: printer friendly implementation

    Hi

    Please check the following article


    HTH
    Ravikanth[MVP]

    "ST" wrote:
    [color=blue]
    > Hi,
    >
    > I'm implementing a printer friendly feature for all the pages on a web site.
    > I'm separating the header, content, and footer into separate ascx files,
    > which are contained in the main file. In the mail file I have a link button
    > which, supposedly, when clicked on, passes the current content page's url and
    > page title to the printer friendly page, which has a placeholder for the
    > content page. I could do this with session variables, but if I do it this
    > way, how do I make a function common to all to accomplish this? I can't use
    > a class file with session variables, so I'm trying to post all the content
    > pages to the printer friendly page but have had no luck so far. Can I use
    > javascript for this? Or can this be accomplished with code behind? Any
    > suggestions and/or comments will be greatly appreciated!
    >
    > Sorry for the long message and thanks in advance!
    >
    > -ST[/color]

    Comment

    • Colin Young

      #3
      Re: printer friendly implementation

      Another option that works in modern browsers that are at least mostly
      standards-compliant (and that includes IE 6 which is how old now?) is to use
      CSS to define a print style sheet. See
      http://www.alistapart.com/articles/goingtoprint/ It's a much easier option
      than the traditional method of launching a new page.

      Colin

      "ST" <ST@discussions .microsoft.com> wrote in message
      news:801238B7-E571-415A-9AEE-1190ADB7D68B@mi crosoft.com...[color=blue]
      > Hi,
      >
      > I'm implementing a printer friendly feature for all the pages on a web[/color]
      site.[color=blue]
      > I'm separating the header, content, and footer into separate ascx files,
      > which are contained in the main file. In the mail file I have a link[/color]
      button[color=blue]
      > which, supposedly, when clicked on, passes the current content page's url[/color]
      and[color=blue]
      > page title to the printer friendly page, which has a placeholder for the
      > content page. I could do this with session variables, but if I do it this
      > way, how do I make a function common to all to accomplish this? I can't[/color]
      use[color=blue]
      > a class file with session variables, so I'm trying to post all the content
      > pages to the printer friendly page but have had no luck so far. Can I use
      > javascript for this? Or can this be accomplished with code behind? Any
      > suggestions and/or comments will be greatly appreciated!
      >
      > Sorry for the long message and thanks in advance!
      >
      > -ST[/color]


      Comment

      Working...