【发布时间】:2016-01-29 16:02:45
【问题描述】:
我正在使用 asp.net ASPX 页面。我已将toastr.js 放在我的MasterPage 上。它工作正常。我在带有保存按钮的页面上使用它,该按钮保持在同一页面上,如下所示:
ScriptManager.RegisterStartupScript(this, this.GetType(), "toastr", "toastr.info("Save successful.");", true);
还有一个保存和继续按钮,用于保存和加载下一页,如下所示:
ScriptManager.RegisterStartupScript(this, this.GetType(), "toastr", "toastr.info("Save successful.");window.location='NextPage.aspx';", true);
但是,当我单击“保存并继续”按钮时,它会闪烁通知,但随后会加载下一页并且它消失了。跨页面变化没有持久性。
也许我对 javascript 的细节不太了解,但是否有一些异步方式来加载 toast 通知,因此它们不是特定于页面的?
【问题讨论】:
标签: javascript c# asp.net toastr