Print friendly page

Discussion in 'ASP .Net' started by Matt Mercer, Sep 13, 2004.

  1. Matt Mercer

    Matt Mercer Guest

    Hi,

    I have a asp .net/VB web app that does the typical submitting and
    retrieving from a SQL database. I am lost as to how I should create a
    print friendly page for the data. Here is the situation. The user is
    looking at a page with Text, asp .net controls, and buttons. I want
    the user to be able to hit a print friendly button and a new window
    will open, but this new window will have only plain text. Database
    fields -- and database values. I need to build this page somehow, and
    it would be great if I could reference the values in the exisiting
    form instead of calling to the database again. Right?

    Thanks all.
    Matt Mercer, Sep 13, 2004
    #1
    1. Advertising

  2. Matt Mercer

    Hermit Dave Guest

    This is the sort of place where session comes handy. Store the data that you
    would like to reuse in Sessio object(s) and then load your printer friendly
    page.
    server side printer friendlly code.. read those session values and off you
    go

    --

    Regards,

    Hermit Dave
    (http://hdave.blogspot.com)
    "Matt Mercer" <> wrote in message
    news:...
    > Hi,
    >
    > I have a asp .net/VB web app that does the typical submitting and
    > retrieving from a SQL database. I am lost as to how I should create a
    > print friendly page for the data. Here is the situation. The user is
    > looking at a page with Text, asp .net controls, and buttons. I want
    > the user to be able to hit a print friendly button and a new window
    > will open, but this new window will have only plain text. Database
    > fields -- and database values. I need to build this page somehow, and
    > it would be great if I could reference the values in the exisiting
    > form instead of calling to the database again. Right?
    >
    > Thanks all.
    Hermit Dave, Sep 13, 2004
    #2
    1. Advertising

  3. Matt Mercer

    Jeff B Guest

    Also,

    You dont have to store those values in session unless ans until the user
    clicks the "print friendly button".
    You cant handle that in the click event handler. And, after loading the
    other page with the session stored information you can Remove those values
    created in session. Just to keep everything cleaned up.

    Just a thought.

    Jeff B



    "Hermit Dave" <> wrote in message
    news:%23nR$...
    > This is the sort of place where session comes handy. Store the data that

    you
    > would like to reuse in Sessio object(s) and then load your printer

    friendly
    > page.
    > server side printer friendlly code.. read those session values and off you
    > go
    >
    > --
    >
    > Regards,
    >
    > Hermit Dave
    > (http://hdave.blogspot.com)
    > "Matt Mercer" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > I have a asp .net/VB web app that does the typical submitting and
    > > retrieving from a SQL database. I am lost as to how I should create a
    > > print friendly page for the data. Here is the situation. The user is
    > > looking at a page with Text, asp .net controls, and buttons. I want
    > > the user to be able to hit a print friendly button and a new window
    > > will open, but this new window will have only plain text. Database
    > > fields -- and database values. I need to build this page somehow, and
    > > it would be great if I could reference the values in the exisiting
    > > form instead of calling to the database again. Right?
    > >
    > > Thanks all.

    >
    >
    Jeff B, Sep 13, 2004
    #3
  4. Matt Mercer

    Hermit Dave Guest

    true again.. but if he just wants to make one call he will need to set it
    before the current page is rendered.
    well viewstate can also be used. but i agree on clean up... remove
    everything you are not using

    --

    Regards,

    Hermit Dave
    (http://hdave.blogspot.com)
    "Jeff B" <> wrote in message
    news:...
    > Also,
    >
    > You dont have to store those values in session unless ans until the user
    > clicks the "print friendly button".
    > You cant handle that in the click event handler. And, after loading the
    > other page with the session stored information you can Remove those values
    > created in session. Just to keep everything cleaned up.
    >
    > Just a thought.
    >
    > Jeff B
    >
    >
    >
    > "Hermit Dave" <> wrote in message
    > news:%23nR$...
    > > This is the sort of place where session comes handy. Store the data that

    > you
    > > would like to reuse in Sessio object(s) and then load your printer

    > friendly
    > > page.
    > > server side printer friendlly code.. read those session values and off

    you
    > > go
    > >
    > > --
    > >
    > > Regards,
    > >
    > > Hermit Dave
    > > (http://hdave.blogspot.com)
    > > "Matt Mercer" <> wrote in message
    > > news:...
    > > > Hi,
    > > >
    > > > I have a asp .net/VB web app that does the typical submitting and
    > > > retrieving from a SQL database. I am lost as to how I should create a
    > > > print friendly page for the data. Here is the situation. The user is
    > > > looking at a page with Text, asp .net controls, and buttons. I want
    > > > the user to be able to hit a print friendly button and a new window
    > > > will open, but this new window will have only plain text. Database
    > > > fields -- and database values. I need to build this page somehow, and
    > > > it would be great if I could reference the values in the exisiting
    > > > form instead of calling to the database again. Right?
    > > >
    > > > Thanks all.

    > >
    > >

    >
    >
    Hermit Dave, Sep 13, 2004
    #4
  5. how about creating a printer friendly stylesheet. When the user clicks print
    you use the printer friendly styelsheet.
    why save anything in session, use a new CSS.

    http://www.411asp.net/ has some examples on this

    "Hermit Dave" wrote:

    > true again.. but if he just wants to make one call he will need to set it
    > before the current page is rendered.
    > well viewstate can also be used. but i agree on clean up... remove
    > everything you are not using
    >
    > --
    >
    > Regards,
    >
    > Hermit Dave
    > (http://hdave.blogspot.com)
    > "Jeff B" <> wrote in message
    > news:...
    > > Also,
    > >
    > > You dont have to store those values in session unless ans until the user
    > > clicks the "print friendly button".
    > > You cant handle that in the click event handler. And, after loading the
    > > other page with the session stored information you can Remove those values
    > > created in session. Just to keep everything cleaned up.
    > >
    > > Just a thought.
    > >
    > > Jeff B
    > >
    > >
    > >
    > > "Hermit Dave" <> wrote in message
    > > news:%23nR$...
    > > > This is the sort of place where session comes handy. Store the data that

    > > you
    > > > would like to reuse in Sessio object(s) and then load your printer

    > > friendly
    > > > page.
    > > > server side printer friendlly code.. read those session values and off

    > you
    > > > go
    > > >
    > > > --
    > > >
    > > > Regards,
    > > >
    > > > Hermit Dave
    > > > (http://hdave.blogspot.com)
    > > > "Matt Mercer" <> wrote in message
    > > > news:...
    > > > > Hi,
    > > > >
    > > > > I have a asp .net/VB web app that does the typical submitting and
    > > > > retrieving from a SQL database. I am lost as to how I should create a
    > > > > print friendly page for the data. Here is the situation. The user is
    > > > > looking at a page with Text, asp .net controls, and buttons. I want
    > > > > the user to be able to hit a print friendly button and a new window
    > > > > will open, but this new window will have only plain text. Database
    > > > > fields -- and database values. I need to build this page somehow, and
    > > > > it would be great if I could reference the values in the exisiting
    > > > > form instead of calling to the database again. Right?
    > > > >
    > > > > Thanks all.
    > > >
    > > >

    > >
    > >

    >
    >
    >
    =?Utf-8?B?SUdvdFlvdXJEb3ROZXQ=?=, Sep 13, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QXhmb3Jk?=

    print a user-friendly page?

    =?Utf-8?B?QXhmb3Jk?=, May 15, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    481
    =?Utf-8?B?QXhmb3Jk?=
    Jun 2, 2006
  2. howa
    Replies:
    2
    Views:
    338
    Jim Langston
    Apr 22, 2008
  3. Mike
    Replies:
    1
    Views:
    1,084
    Andrew Morton
    Feb 11, 2009
  4. techy techno
    Replies:
    10
    Views:
    711
    Jeff Cochran
    Jan 21, 2004
  5. weiwei

    print friendly function with asp

    weiwei, Oct 1, 2004, in forum: ASP General
    Replies:
    1
    Views:
    262
    Ray Costanzo [MVP]
    Oct 1, 2004
Loading...

Share This Page