how can print asp.net page without printing button text

Hi,
On asp.net page code behind C#, I have some data and two link buttons on that page. One link button is Print and second is Close the page. When I press the print it print the whole page is printed using following script:
private void lbPrint_Click(object sender, System.EventArgs e)
{
Page.RegisterStartupScript("PrintPage","<script language='javascript'>window.print()</script>");
}

But it print close button and print button on printed document. I want to print document without the print and close button text but after printing both button should be display on page which I can use to print other copy or close the page.

Please help me out from this ..its very urgent.

Thanks,

Sukh.This really has nothing to do with asp.net because asp.net is run by the server and not by the client. Asp.net never touches the browser's print settings or the printer.Add some additional javascript prior to window.print() to hide the 2 buttons, then unhide them after window.print().
 
Back
Top