Printing a asp net web page

Asked By Pragya Jaiswal
20-Mar-05 07:06 PM
Earn up to 0 extra points for answering this tough question.
I am a novice in asp.net and so please pardon my question if it seems silly. Presently I am working on an asp/c#.net project and for that I need to print a web page, which has a record retrieved by querying from the sql server database.Each record has about 50 fields. The data is displayed in the form of a table with 2 columns and 50 rows. Each of this rows have some text boxes and labels. Because there are so many rows I want that the table comes in a good format on both pges rather than breaking abruptly on one page.Basically, it is a "form" sort of a page. This is an example of the page I need to print: http://www5.geog.okstate.edu/NewOli/querydata.aspx?objectid%20=15702 The problem is I dont know how to print the page without the buttons being shown on the print page, without the bottom "home, logout" etc and also there is a datagrid in the page which has visibility as "false" , but still print with 2 empty pages. How can I eliminate that?Also, I need page breaks at appropriate places on the page. How can I print only the contents I need ignoring the other contents? Also, I have another question, is there any way to dynamically convert the web page to pdf?Or can anyone tell me which would be a quick and easy way of printing the web page, as I need it very urgently. I would really appreciate any help on this.

  How did you get the print to work

Asked By Dalia fadel
08-Apr-05 12:25 PM
Hi, i'm trying to get a print to work from webpage and found your post while doing a search online. I see you finally got yours to work. Would you please tell me how. mY email is dalia2477@yahoo.com your help is appreciated thanks dalia

  forum

Asked By vel vel
16-Apr-05 02:59 AM
forum

  How to print web page?

Asked By Riny Muliawan
17-May-05 02:21 AM
Hallo.. can you tell me how to print a page?? like your online demo Please Riny (riny.muliawan@kabelvision.com)
  How to print web page?
Asked By Riny Muliawan
17-May-05 02:27 AM
Hallo.. can you tell me how to print a page?? like your online demo Please.. Riny (riny.muliawan@kabelvision.com)
  Printing only specific part of page
Shreya Trivedi replied to Pragya Jaiswal
12-Jun-08 05:31 AM

create a css as follows in javascript:

<STYLE type="text/css" media="print">
   .hidePrint {     visibility:hidden;   display:none;}
 </STYLE>
then apply that css class to the elements you want to hide.

  Print a html page which has a table with empty columns
vinitha pascal replied to Shreya Trivedi
24-Feb-09 12:08 AM

Hi,

I have a dialog box which has a print button and a table with around 50 columns and 10 rows. Few columns in that table are empty. I am able to print this page but the empty columns doesnt appear as is in the UI. I mean the column size is not same as the header as shown in the UI.

Can anyone guide me as how to resolve this?

Thanks in advance.

Create New Account