[英]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.