2015-09-23 37 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