Reputation: 5343
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?
Upvotes: 2
Views: 23143
Reputation: 1313
try this,
System.Web.HttpContext.Current.Response.Write("<script language=\"JavaScript\">alert(\"write here what you want\")</script>");
Upvotes: 2
Reputation: 20745
Use
Response.Write("<script>alert('Successfully added');</script>");
on button code behind.
Upvotes: 6