2010-01-06 30 views
1

我用這句法如何顯示在彈出asp.net

this.Page.ClientScript.RegisterStartupScript(typeof運算(字符串)得到錯誤,「測試」,「警告窗口,從全球資源文件消息( '<%= Resources.Text.Header_Login%>');「);

取悅任何建議給我的答覆

回答

1

試試這個:

this.Page.ClientScript.RegisterStartupScript(typeof(string), "Test", " alert('" + Resources.Text.Header_Login + "');"); 
+0

謝謝,工作正常 – vasanth 2010-01-06 09:35:42

+1

如果這有助於您找到答案,那麼您應該點擊左側的複選標記作爲接受的答案。 – 2010-01-06 13:59:13

1

試試這個:

this.Page.ClientScript.RegisterStartupScript(this.GetType(), "Test", " alert('" + Resources.Text.Header_Login + "');",true); 

的最後一個參數(true)指定的腳本標記添加。