之前在常規頁面下
為了實現注冊一段js腳本
以實現彈出一個消息提示框
通常能這樣做
string strJS = "";
VS2003下
Page.RegisterClientScriptBlock("ajs", strJS);
VS2005下
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ajs", strJS);
在ajax頁面 要實現同樣效果
需要如此做
string strJS = "alert();";
System.Web.UI.ScriptManager.RegisterClientScriptBlock
(this.Button1, this.Button1.GetType(), "ajs", strJS, true);
新聞熱點
疑難解答
圖片精選