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?
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?
Share Improve this question asked May 30, 2012 at 11:54 GeethGeeth 5,34323 gold badges86 silver badges136 bronze badges 2- Check this SO thread stackoverflow./questions/1920397/… – user1921 Commented May 30, 2012 at 11:57
- That reply's are not working for me. – Geeth Commented May 30, 2012 at 12:08
2 Answers
Reset to default 6Use
Response.Write("<script>alert('Successfully added');</script>");
on button code behind.
try this,
System.Web.HttpContext.Current.Response.Write("<script language=\"JavaScript\">alert(\"write here what you want\")</script>");
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743708457a4493768.html
评论列表(0条)