Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-25-2006, 11:31 PM   PM User | #1
sekharyala
New to the CF scene

 
Join Date: Oct 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
sekharyala is an unknown quantity at this point
printing data from web page to preformated A4 size paper

Hi frieds,
I have a problem at my work place to be solved.There is an asp webpage which displays 5 records from database.The web page is having print buton.We have to write a program in such a way that if user presses this button .each record has to be printed on a seperate a4 size preformated paper.Can you please give me sample code to that in ASP or with using CSS.
Waiting for your post
regards
sekhar
sekharyala is offline   Reply With Quote
Old 10-26-2006, 10:37 AM   PM User | #2
mark87
Senior Coder

 
Join Date: Dec 2004
Location: Essex, UK
Posts: 2,636
Thanks: 0
Thanked 0 Times in 0 Posts
mark87 is on a distinguished road
Well firstly you could to set up a print stylesheet which will be used only for printing. You don't have to but it would be easier to keep the styling for the printed page and the screen page seperate.

<link rel="stylesheet" type="text/css" href="print.css" media="print" />

In that stylesheet you'll be able to define how the page should print (use Print Preview to check how it looks).

You can use the CSS property page-break-before:always to force a page-break before an element.
__________________
markaylward.co.uk
mark87 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:56 PM.


Advertisement
Log in to turn off these ads.