如何显示助手警报 [英] How Do I Show Helper Alert

查看:68
本文介绍了如何显示助手警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

更新后我用来刷新

 Response.Redirect(Page.Request.RawUrl, false ); 

我当前的页面,但之后我的帮助器警报现在无法解决任何问题.. ??

解决方案

你应首先显示警报消息然后重定向。



所以在你的 SaveButton_Click()方法中,处理Save按钮,在重定向之前你应该调用使用Javascript的警报消息,如下例所示:

 ClientScript.RegisterStartupScript( this  .GetType() ,  SaveButton  alert('Successfully updated。') true ); 


hello ,
after updating i used to refresh

Response.Redirect(Page.Request.RawUrl, false);

my current page, but after that my helper alert doesn't work now any solution..??

解决方案

You should first display the alert message then to redirect.

So in your SaveButton_Click() method, that handle the Save button, before to redirect you should invoke the alert message by using Javascript like in the next example:

ClientScript.RegisterStartupScript(this.GetType(), "SaveButton", "alert('Successfully updated.')", true); 


这篇关于如何显示助手警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆