Wednesday, April 30, 2008

Print Gridview Data using Javascript

copy and paste this function into your aspx file and use an anchor tag to call this function.
function Print()
{ var printgrid = document.getElementById('');
printgrid .border = 0; //set no border here var strOldOne=prtContent.innerHTML; var Printpop = window.open('','','letf=100,top=100,width=1000,height=1000,toolbar=0,scrollbars=1,status=0,resizable=1'); Printpop .document.write(printgrid .outerHTML); Printpop .document.close(); Printpop .focus(); Printpop .print(); Printpop .close();}

Welcome Friends

Hi Friends,
This Blog is all about helping ASP.NET/C#/VB.NET developers.You guys can post your problems that you face in coding.I will try to help on those.I will also post some nice examples which will include using GDI,Ajax,Linq and other coding related issues.
Please feel free to use this blog for posting your queries and comments

Cheers
Ric