uzn
Posts: 1
|
Posted: 10/28/2010, 7:13 AM |
|
This is the javascript function and I'm calling this method in my vb.net code. The jsfunction printPageZB works fine but function printPage() prints only 1 page, i want 2 pages printed. What am i doing wrong here.....any suggestions?
function printPageZB() {
window.print();
}
function printPage() {
document.getElementById('pnlPhotoBook').style.display = 'none';
window.print();
document.getElementById('pnlPhotoBook').style.display = 'block';
window.print();
}
vb.net code
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim jsr As String = "<script type='text/javascript'>printPage();</script>"
Dim jsr2 As String = "<script type='text/javascript'>printPageZB();</script>"
If pnlPhotoBook.Visible = True Then
If (Not IsStartupScriptRegistered("Startup")) Then
RegisterStartupScript("Startup", jsr.ToString)
End If
Else
If (Not IsStartupScriptRegistered("Startup")) Then
RegisterStartupScript("Startup", jsr2.ToString)
End If
End If
End Sub
Thanks
|
|
|
|