logo

Printing a asp net web page
Pragya Jaiswal posted at Sunday, March 20, 2005 7:06 PM

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.
Reply    Reply Using Power Editor
  Rank Winnings Points
February 0 $0.00 0
January 0 $0.00 0
How did you get the print to work
Dalia fadel replied on Friday, April 08, 2005 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
Reply    Reply Using Power Editor
  Rank Winnings Points
February 0 $0.00 0
January 0 $0.00 0

forum
vel vel replied on Saturday, April 16, 2005 2:59 AM

forum
Reply    Reply Using Power Editor
  Rank Winnings Points
February 0 $0.00 0
January 0 $0.00 0

How to print web page?
Riny Muliawan replied on Tuesday, May 17, 2005 2:21 AM

Hallo.. can you tell me how to print a page?? like your online demo Please
Riny (riny.muliawan@kabelvision.com)
Reply    Reply Using Power Editor
  Rank Winnings Points
February 0 $0.00 0
January 0 $0.00 0

How to print web page?
Riny Muliawan replied on Tuesday, May 17, 2005 2:27 AM

Hallo.. can you tell me how to print a page?? 
like your online demo Please..
Riny (riny.muliawan@kabelvision.com)
Reply    Reply Using Power Editor
  Rank Winnings Points
February 0 $0.00 0
January 0 $0.00 0

Printing only specific part of page
Shreya Trivedi provided a rated reply to Pragya Jaiswal on Thursday, June 12, 2008 5: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.

Reply    Reply Using Power Editor
  Rank Winnings Points
February 0 $0.00 0
January 0 $0.00 0

Print a html page which has a table with empty columns
vinitha pascal replied to Shreya Trivedi on Tuesday, February 24, 2009 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.

Reply    Reply Using Power Editor
  Rank Winnings Points
February 0 $0.00 0
January 0 $0.00 0


Didn't Find The Answer You Were Looking For?

EggHeadCafe has experts online right now that may know the answer to your question.  We pay them a bonus for answering as many questions as they can.  So, why not help them and yourself by becoming a member (free) and ask them your question right now?
Ask Question In Live Forum

If you have an OpenID and do not want to become a member of the EggHeadCafe forum, you can also sign on to Chat Chaos and post your question to our real time Silverlight chat application.
Ask Question In Chat Chaos










  $1000 Contest    [)ia6l0 iii - $231  |  Jonathan VH - $153  |  Huggy Bear - $133  |  egg egg - $100  |  F Cali - $93  |  more Advertise  |  Privacy  |   (c) 2010