Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > printing

Reply
Thread Tools

printing

 
 
mark
Guest
Posts: n/a
 
      03-03-2004
i have a report page that opens a page with a datagrid and two buttons
one called print one called exit - when i print i dont want the buttons to
show
- i got round it by setting the buttons to visible = false - but they dont
come back after
printing - even if i set the buttons back to visible

my code

<code>
Button1.Visible = False
Button2.Visible = False
Dim clientscript As String
clientscript = "<script
language='javascript'>window.print();</script>"
RegisterStartupScript("openwindows", clientscript)
</code>

cheers

mark


 
Reply With Quote
 
 
 
 
Carlos Campos
Guest
Posts: n/a
 
      03-03-2004
You may use the stylesheet media....

Define in your css file a media print section, and redifine the button style
to be not visible.

The buttons will be visible in browser but not in the printed page... you
can hide all that you want

"mark" <(E-Mail Removed)> wrote in message
news:n6n1c.2924$zu.2781@newsfe1-win...
> i have a report page that opens a page with a datagrid and two buttons
> one called print one called exit - when i print i dont want the buttons to
> show
> - i got round it by setting the buttons to visible = false - but they dont
> come back after
> printing - even if i set the buttons back to visible
>
> my code
>
> <code>
> Button1.Visible = False
> Button2.Visible = False
> Dim clientscript As String
> clientscript = "<script
> language='javascript'>window.print();</script>"
> RegisterStartupScript("openwindows", clientscript)
> </code>
>
> cheers
>
> mark
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 2 11-27-2010 12:12 PM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:52 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:50 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:28 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-18-2007 10:11 AM



Advertisments