首页 新闻 会员 周边

求打印THML文件的方法

0
悬赏园豆:30 [已关闭问题] 关闭于 2011-08-09 15:14

我想打印 Editor1.Text 里的内容, Editor1.Text里面是thml的,怎么编码啊··求高手给个代码吧

问题补充:

后台————————

  protected void mytrsh_Click(object sender, EventArgs e)
    {
        string txtname = this.mytrsh.Text.Trim();
        if (txtname == "打印")
        {
           问题在这? 要是== 打印的话·怎么才能执行下面的脚本啊。
        }

前台——————————

<script type="text/javascript" language="javascript">

           function printht(btnPrintID) {
               var btnPrint = document.getElementById(btnPrintID);             
               pagesetup_null()
               return false;
           }

           function pagesetup_null() {

               try {

                   var RegWsh = new ActiveXObject("WScript.Shell")

                   hkey_key = "header"

                   RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "")

                   hkey_key = "footer"

                   RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "")

               } catch (e) { }
               window.print();
           }


           function ReturnView() {
               window.location = 'ClfFrame.aspx';
           }

维人的主页 维人 | 初学一级 | 园豆:10
提问于:2011-05-30 11:13
< >
分享
所有回答(1)
0

System.Web.HttpContext.Current.Response.Write(Editor1.Text);

邀月 | 园豆:25475 (高人七级) | 2011-05-30 12:31
后台————————

protected void mytrsh_Click(object sender, EventArgs e)
{
string txtname = this.mytrsh.Text.Trim();
if (txtname == "打印")
{
问题在这? 要是== 打印的话·怎么才能执行下面的脚本啊。
}

前台——————————

清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册