遇到一个问题,现在需要在框架页中执行打印,打印按钮在上页,要打印的内容在下页(如图)------------------------------------------------------------------
  frame name="top"           打印按钮(button1)   print.aspx
------------------------------------------------------------------
 frame name="bottom"         打印内容   main.aspx 
按钮(button2)
-------------------------------------------------------------------我使用的方法是:在print.aspx上加一个html按钮button1,在button的onclick事件中加入parent.frames["bottom"].focus();
top.frames['bottom'].document.all.button2.click();调用button2的click事件
在main.aspx上加一个服务器按钮

private void Button2_Click(object sender, System.EventArgs e)
{
添加打印内容(查询数据库....) Response.Write("<script>alert('ok')</script>");
        Response.Write("<script>window.print()</script>");//使用window.print()打印
}***********************************************************************************我的问题是:
Response.Write("<script>alert('ok')</script>");都可以执行弹出"ok" 
但是Response.Write("<script>window.print()</script>");一点动静都没有!!!!。
如果我以main.aspx作为起始页的话点击Button2则可以打印,不知道为什么,大家能给个解决方法吗,谢谢!!!!