Print friendly page

M

Matt Mercer

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

Hermit Dave

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

Jeff B

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
(e-mail address removed)
 
H

Hermit Dave

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

Guest

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
 

Ask a Question

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.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top