Hi,
For printing the textbox value you can use
Response.Write(txtdemo.Text);
For printing the gridview you need to do like this:
put an html button on that page that says print and tie it to a javascript function then have that function open a new window and write the gridview to it then print?
<input id="prtButton" type="button" value="Print" onclick="CallPrint('<%= GridView1.ClientID %>');" />
<script language="javascript" type="text/javascript">
function CallPrint( strid )
{
var prtContent = document.getElementById( strid );
var WinPrint = window.open('', '', 'left=0,top=0,width=1050,height=600,toolbar=1,scrollbars=1,status=0');
WinPrint.document.write( prtContent.innerHTML );
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}
</script>
Thanks