printing

Discussion in 'ASP .Net' started by mark, Mar 3, 2004.

  1. mark

    mark Guest

    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
     
    mark, Mar 3, 2004
    #1
    1. Advertising

  2. 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" <> 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
    >
    >
     
    Carlos Campos, Mar 3, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon B
    Replies:
    7
    Views:
    7,512
    =?Utf-8?B?SmFzb25DaG9p?=
    Jan 30, 2006
  2. JustSomeGuy
    Replies:
    13
    Views:
    513
    msalters
    Dec 9, 2004
  3. iffy agbim
    Replies:
    1
    Views:
    110
    Mark Andrews
    May 24, 2004
  4. iffy agbim
    Replies:
    0
    Views:
    104
    iffy agbim
    May 21, 2004
Loading...

Share This Page