I want to show a message "Successfully added" after saving the record to the database on button click which already having a JS function for some validation on the data. i have tried the following code but nothing is showing.
ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert",
"<script>alert('" + "Successfully added" + "');</script>", false);
How to show the success message in a popup with at the end save process?
Use Response.Write("<script>alert('Successfully added');</script>");
on button code behind.
尝试这个,
System.Web.HttpContext.Current.Response.Write("<script language=\"JavaScript\">alert(\"write here what you want\")</script>");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.