Click to See Complete Forum and Search --> : Print a page in ASP


kwilliams
07-16-2003, 11:05 AM
Is there a way to print a page using ASP, similar to JavaScript, but without using JavaScript?

KWilliams

kwilliams
07-17-2003, 08:32 AM
Well I actually figured out a way to have the JavaScript print capability in the middle of ASP...sort of. This is what I came up with that works:

<%
if (Session("Job_ID") != "undefined")
{
Response.Write(Session("Job_ID"))
%>
<script type="text/javascript">
window.print()
</script>
<%
}
else
{
while ((Repeat1__numRows-- != 0) && (!rsEmplApp2.EOF)) {
Response.Write((rsEmplApp2.Fields.Item("Job_ID").Value) + "&nbsp;")
Repeat1__index++;
rsEmplApp2.MoveNext();
}
}
%>

KWilliams

kwilliams
07-17-2003, 08:41 AM
I guess if you want to just give me an answer to my question, your answer was fine. But any help would have been appreciated, even if you had pointed me in the right direction. But that's fine, since I solved it myself.

KWilliams

kwilliams
07-18-2003, 08:23 AM
Sure.