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()方法!呵呵,也不知道是否多此一举。
posted @ 2008-03-14 10:49  Shapley  阅读(528)  评论(0编辑  收藏  举报