Printing issues using javascript function to print in asp.net

XTNCi

New Member
So I have a div with many rows in it then on a button click i try to print all of the rows out but for some reason i only get about 1/3 of them. This is the code that it is using.\[code\] function buildPrint() { var sourceDiv = document.getElementById("display_div"); document.getElementById("print_div").innerHTML = sourceDiv.innerHTML; window.print(); }<asp:Content ID="Content3" ContentPlaceHolderID="BodyPlaceHolder" runat="server"><div id="display_div"><asp:CheckBox ID="showAllOptionals" runat="server" Text="Show All Optionals" AutoPostBack="true" /><asp:Literal ID="mainTable" runat="server" /></div></asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="PrintContent" runat="server"><div id="print_div" style="page-break-after:always;"></div>\[/code\]Back end code:\[code\]<input onclick=\"buildPrint();\" id=\"printBtn\" type=\"button\" value=http://stackoverflow.com/"Print\">\[/code\]Does anyone know why I cant have it print the entire full div???
 
Back
Top