Hope this helps
<title>
function generatePDF() {
pvwindow = window.open('', 'PrintWindow', ' location = 0, status = 0, scrollbars = 1, width = 750, height = 600')
pvwindow.document.write("<html>");
pvwindow.document.write("<head>");
pvwindow.document.write("</head>");
pvwindow.document.write("<body style="background-color:white;" onload="window.print();">");
pvwindow.document.write(document.getElementById("dvmain").innerHTML);
pvwindow.document.write("</body>");
pvwindow.document.write("</html>");
pvwindow.document.close();
return false;
}
hi this is test. change print option to save as PDF..(Not Working in Internet Explorer)
<asp:button runat="server" id="btnClick" onclientclick="return generatePDF();" text="Click" xmlns:asp="#unknown">