vs2008运行脚本方法

1.运行脚本
ScriptManager.RegisterStartupScript(this.lblNewPage,this.GetType(),"aa","opener.focus();window.close();",true);
Page.RegisterStartupScript();
ClientScript.RegisterStartupScript(this.GetType(), "OhCrap", String.Format("alert('There was a problem in sending the email: {0}');", "hh"),true);
2.向客户端注册脚本
Page.RegisterClientScriptBlock();
ScriptManager.RegisterClientScriptBlock();
ClientScript.RegisterClientScriptBlock();
vs2008竟然自己实现了focus()方法!呵呵,也不知道是否多此一举。

你可能感兴趣的:(vs2008)