private void btnPrint_Click(object sender, RoutedEventArgs e) { string FormNo = string.Empty; string ReportName = string.Empty; FormNo = txtFormNo.Text; ReportName = "InHouse"; ScriptObject Show = HtmlPage.Window.GetProperty("Show") as ScriptObject; Show.InvokeSelf(FormNo, ReportName); } function Show(FormNo, ReportName) { var IHeight = 400; var IWidth = 1000; var ITop = (window.screen.height - IHeight) / 2; var ILeft = (window.screen.width - IWidth) / 2; window.open("Print/PrintPages.aspx?FormNo=" + FormNo + "&ReportName=" + ReportName + "", "newwindow", "height=" + IHeight + ", width=" + IWidth + ", top=" + ITop + ", left=" + ILeft + ", toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no"); }