如何在重定向到另一个页面之前显示成功消息客户端? [英] How to show success message client side before redirecting to another page?
本文介绍了如何在重定向到另一个页面之前显示成功消息客户端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下是我的代码...它重定向到另一个页面而没有显示警告消息....
obj.InsAttendance (会话[ EmpID]。ToString(),(DateTime.Now).ToString(), ,DateTime.Today.ToString( dd / MM / yyyy));
ScriptManager.RegisterStartupScript( this ,GetType(), displayalertmessage, showalert();,< span class =code-keyword> true );
Response.Redirect( DashBoard.aspx);
解决方案
试试这个
Response.Write(< script> alert('Your Message') )< /脚本>中);
Following are my code ...its redirecting to another page without showing alert message....
obj.InsAttendance(Session["EmpID"].ToString(), (DateTime.Now).ToString(), "", DateTime.Today.ToString("dd/MM/yyyy"));
ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "showalert();", true);
Response.Redirect("DashBoard.aspx");
解决方案
try this
Response.Write("<script>alert('Your Message')</script>");
这篇关于如何在重定向到另一个页面之前显示成功消息客户端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文