Based on what you ask, it's not too clear on what specifically you are trying and where are you stuck.
For Web applicaton, print code has to be on client side.
Either you can write your print related code in code behind and then inject it into the page:
How to Print in ASP.NET 2.0[
^]
OR using JavaScript directly on the page itself, like:
function CallPrint()
{
var printContent = document.getElementById('<%= pnlToPrint.ClientID %>');
var printWindow = window.open("", "Print Panel", ‘left=50000,top=50000,width=0,height=0′);
printWindow.document.write(prtContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
}
<asp: Panel runat="server" id="pnlToPrint" >
<table>
<tr>
<td>
Your data
</td>
</tr>
</table>
</asp: Panel>
<input type="button" value="Print" onclick="CallPrint();" />