![](/img/trans.png)
[英]How to display Bootstrap Autocloseable alert message on asp.net button click?
[英]Show Alert message on button click after saving the data asp.net
我想在按钮单击上将记录保存到数据库之后显示消息“成功添加”,该按钮单击已经具有JS功能以对数据进行一些验证。 我尝试了以下代码,但没有显示任何内容。
ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert",
"<script>alert('" + "Successfully added" + "');</script>", false);
如何在结束保存过程中在弹出窗口中显示成功消息?
使用Response.Write("<script>alert('Successfully added');</script>");
在按钮代码后面。
尝试这个,
System.Web.HttpContext.Current.Response.Write("<script language=\"JavaScript\">alert(\"write here what you want\")</script>");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.