Vb.net 8.5 x 11paper to webform
Basically what i have is a vb.net form that when a user clicks the submit button I am going to store the values in a SQL database. This i have done already.
What I w开发者_如何学JAVAould like to know is what is the best way to approach after the user clicks submit to submit the form to the database then should I use a separate button to call the values into a crystal report or report designer? Or is there a CSS template that will mimic the size of a piece of paper on the web and print as seen on the screen.
I tried to create a website 612 x 792 which from what i googled was the size of a 8.5 x 11 sheet of paper however although it looked great on the web when i printed it decided to print 4 pages when it should only have been 2 pages. So little confused and thinking maybe that I am approaching this the wrong way any advice would be appreciated.
Thanks
Here is the part of my css code that i am trying to make the size of a paper
body
{ background: #b6b7bc; font-size: .70em; font-family: Arial; margin: 0px; padding: 0px; color: #696969; }firstpagecontainer
{ width: 612px; height: 792px; background-color:#FFFFFF; margin-top: 50px; margin-bottom: 50px; margin-left: auto; margin-right: auto; padding: 0px; border: thin solid #000000; }
secondpagecontainer
{ width: 612px; height: 792px; background-color:#FFFFFF; margin-top: 50px; margin-bottom: 50px; margin-left: auto; margin-right: auto; padding: 0px; border: thin solid #000000; }
You can't guarantee that 612x792 is the rendered size of a web page on paper.
What you need to do is build your page so that it works fine with varying resolutions, and use CSS to help you.
This page has some information to get you started, but it is geared more for a print version of screen content: http://line25.com/tutorials/handy-tips-for-creating-a-print-css-stylesheet
If you need to guarantee a specific size on paper, you need to use PDF.
精彩评论