2015-09-23 35 views
0

我真的試圖證明提交表單後消息給用戶,並希望返回,我從數據庫得到的消息裏面像波紋管腳本經理在asp.net不工作

int reqid = come from database; 

string scrp = "<script>alert('your request submitted with number " + reqid.ToString() + " successfully !');'</script>"; 

ScriptManager.RegisterStartupScript(this , GetType(), "alert", scrp , true); 

我不標識不知道腳本爲什麼不起作用。

我在我的頁面中使用ajax功能。

回答

1

刪除<script>標籤和PLZ嘗試下面的代碼

int reqid = come from database; 

string scrp = "alert('your request submitted with number " + reqid.ToString() + " successfully !');"; 

ScriptManager.RegisterStartupScript(this , this.GetType(), "alert", scrp , true); 
+0

哈哈哈哈,感謝了很多人,我幾乎因爲這個瘋了。 –

+0

不是問題:) – Webruster