from this link you can get the answer
http://forums.asp.net/t/1556818.aspx
1- add this script to the content of your page
<script type="text/javascript"> function doPrint() { var prtContent = document.getElementById('<%= DetailsDiv.ClientID %>'); prtContent.border = 0; //set no border here var WinPrint = window.open('', '', 'left=100,top=100,width=1000,height=1000,toolbar=0 ,scrollbars=1,status=0,resizable=1'); WinPrint.document.write(prtContent.outerHTML); WinPrint.document.close(); WinPrint.focus(); WinPrint.print(); WinPrint.close(); } </script>
<script type="text/javascript">
function doPrint() {
var prtContent = document.getElementById('<%= DetailsDiv.ClientID %>');
prtContent.border = 0; //set no border here
var WinPrint = window.open('', '', 'left=100,top=100,width=1000,height=1000,toolbar=0 ,scrollbars=1,status=0,resizable=1');
WinPrint.document.write(prtContent.outerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}
</script>
2- add image button or link button and add this code to
<asp:ImageButton ID="BtnPrint" OnClientClick="doPrint()" ImageUrl="~/GraduateStudiesReg/imagefs (1).JPG" runat="server" />
Mahmoud Moustafa