can anyone tell me what code should i use to print when i click the button it'll automatically print the page? or any other suggestion?

Have you tried checking here?

Hope that helps :) Please remember to mark solved once your issue is resolved.

can you explain for me further..i cannot get it from there..

Ok, basically, what I'm finding when I look at print options for web applications is this...

1) It's not a code-behind process, it's a user-end process
2) It can be accomplished using JavaScript or other browser-level scripting

A simple method to invoke a 'print-screen' type scenario would be the JavaScript function of


Which will call the page print function. Beyond that, if you want to add additional print functionality (page layout, etc) you would need to look into other JavaScript or possibly ActiveX controls of some sort to implement those functions.

Hope that helps :) Please remember to mark as solved once your issue is resolved.

P.s.: The above information was from the first non-advertising link in the search I posted to you earlier... Please try to perform basic research before asking others to do your work for you in the forums :twisted:

firest create java script

<script type="text/javascript">
function printfn()
function cancelfn()

than write code in aspx file like this ....

<td align="center" valign="top" ><span id="1001a1">To Print Click Heare <a href="PrintPage.aspx" onclick="javascript:printfn();">(Print)</a></span></td>
                        <td align="center" valign="top"><span id="1001a2">To Cancel Click Heare<a href="CancelthanGoToPage.aspx" onclick="javascript:cancelfn();">(Cancel)</a></span></td>

and enjoy it.....


Download Sample Page Simple Way.rar
Patel Rikin