<Head runat = "server">
<Title> No title page </title>
<Script language = "Javascript" type = "text/javascript">
Function preview ()
{
Bdhtml###doc ument. body. innerHTML;
Sprnstr = "<! -- Startprint --> ";
Eprnstr = "<! -- Endprint --> ";
Prnhtml = bdhtml. substr (bdhtml. indexOf (sprnstr) + 17 );
Prnhtml = prnhtml. substring (0, prnhtml. indexOf (eprnstr ));
Too many Doc ument. body. innerHTML = prnhtml;
Window. print ();
}
</Script>
</Head>
<Body>
<Form id = "form1" runat = "server">
<Center> This part is not printed. </center>
<! -- Startprint -->
<Div align = "center">
<Asp: GridView ID = "GridView1" runat = "server"> </asp: GridView>
</Div>
<! -- Endprint -->
<Center> This part is not printed below </center>
<Div align = "center">
<Input type = "button" name = "print" value = "print" onclick = "preview ()"/>
</Div>
Sdfsfsdfsdfsdfsdfsdf
Sdfsdfsdfsdfsdfsdfsdfsd
Sfsfsdfsd
<Input class = "Noprn" type = "button" onclick = "window. print ()" value = "print"/>
</Form>
</Body>
</Html>