Quote:<script language="javascript" type="text/javascript"> function PrintDivContent(strid) { var prtContent = document.getElementById(strid); var WinPrint = window.open('', '', 'letf=0,top=0,toolbar=0,status=0'); WinPrint.document.write(prtContent.innerHTML); WinPrint.document.close(); WinPrint.focus(); WinPrint.print(); } <</script>" and Div to which values to be printed: "Quote: M.P. Filaments Denier :<asp:TextBox ID="TextBox1" runat="server" CssClass="style1"> Gross Weight :<asp:TextBox ID="TextBox6" runat="server" CssClass="style1" AutoPostBack="true"> Shade :<asp:TextBox ID="TextBox2" runat="server" CssClass="style1"> Tare Weight :<asp:TextBox ID="TextBox7" runat="server" CssClass="style1" AutoPostBack="true" ontextchanged="TextBox7_TextChanged1"> Shade No:<asp:TextBox ID="TextBox3" runat="server" CssClass="style1"> Net Weight:<asp:TextBox ID="TextBox8" runat="server" CssClass="style1" AutoPostBack="true"> Box No :<asp:TextBox ID="TextBox4" runat="server" CssClass="style1"> No. Of Cones :<asp:TextBox ID="TextBox9" runat="server" CssClass="style1"> Lot No :<asp:TextBox ID="TextBox5" runat="server" CssClass="style1"> Packed By:<asp:TextBox ID="TextBox10" runat="server" CssClass="style1"> " and button which will print: "Quote:<asp:Button ID="btnPrint" Text="Print" OnClientClick="javascript:PrintDivContent('print');" runat="Server" Width="94px" Height="30px" style="font-weight: 700; color: #0099FF; background-color: #CC3300" /> So Now question is that I am using IE to run this (browser), i want to get the things printed in the 6*4 dimensions. now it is taking A4 size and printing the page with the values in A4 dimensions. so i want the modification in the code so that it should print the page according to the Dimension provided to it.like 6 width and 4 high. and continue the printing like this without leaving or ejecting empty page. "
Quote: M.P. Filaments Denier :<asp:TextBox ID="TextBox1" runat="server" CssClass="style1"> Gross Weight :<asp:TextBox ID="TextBox6" runat="server" CssClass="style1" AutoPostBack="true"> Shade :<asp:TextBox ID="TextBox2" runat="server" CssClass="style1"> Tare Weight :<asp:TextBox ID="TextBox7" runat="server" CssClass="style1" AutoPostBack="true" ontextchanged="TextBox7_TextChanged1"> Shade No:<asp:TextBox ID="TextBox3" runat="server" CssClass="style1"> Net Weight:<asp:TextBox ID="TextBox8" runat="server" CssClass="style1" AutoPostBack="true"> Box No :<asp:TextBox ID="TextBox4" runat="server" CssClass="style1"> No. Of Cones :<asp:TextBox ID="TextBox9" runat="server" CssClass="style1"> Lot No :<asp:TextBox ID="TextBox5" runat="server" CssClass="style1"> Packed By:<asp:TextBox ID="TextBox10" runat="server" CssClass="style1"> " and button which will print: "Quote:<asp:Button ID="btnPrint" Text="Print" OnClientClick="javascript:PrintDivContent('print');" runat="Server" Width="94px" Height="30px" style="font-weight: 700; color: #0099FF; background-color: #CC3300" /> So Now question is that I am using IE to run this (browser), i want to get the things printed in the 6*4 dimensions. now it is taking A4 size and printing the page with the values in A4 dimensions. so i want the modification in the code so that it should print the page according to the Dimension provided to it.like 6 width and 4 high. and continue the printing like this without leaving or ejecting empty page. "
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)