我有一些 html 内容,我将它存储在字符串变量中,我想直接打印它。c# 中有什么方法吗?我有一个 javascript 代码不起作用
string emailbody="HTML i need to send";
Page.RegisterStartupScript("StatusMessage", "<SCRIPT LANGUAGE=\"JavaScript\">function printsheet(" + emailbody + "){var win = window.open('mywindow', 'left=0', 'top=0')var html = Zstring; win.document.open()win.document.write(html);win.print();}</Script>");