I wrote this code but still print preview option is coming...
this.contentWindow.print() for printing purpose 
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
     <script>
   function printPage()
   {
      var div = document.getElementById("printerDiv");
      div.innerHTML = '<iframe src="PrintDemo.aspx" onload="this.contentWindow.print();"></iframe>';
   }
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <button onclick="printPage()">prin`enter code here`t</button>
<div id="printerDiv" ">
    This Page Is for print demo`enter code here`
</div>
    </div>
    </form>
</body>
</html>