显示消息框,然后转到下一页 [英] Show Messagebox and then go to next page

查看:89
本文介绍了显示消息框,然后转到下一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我希望当用户单击保存"按钮时,消息框"应打开您的数据已保存".然后转到下一页.我尝试执行(见下文)代码.

ScriptManager.RegisterStartupScript(this,GetType(),"alert","alert(''您的数据已保存.);",true);
Response.Redirect("UserLogin.aspx");

但它不是播种消息,它仅转到下一页.在asp.net(C#)3.5
帮帮我.

Hi I want when user click on save button then Message Box should open "Your Data has been Saved." and then It go to next page.I''m try do(see below) code.

ScriptManager.RegisterStartupScript(this, GetType(), "alert", "alert(''Your Data has been Saved.'');", true);
Response.Redirect("UserLogin.aspx");

but it is not sowing message it just go to next page. In asp.net(C#)3.5
help me.

推荐答案

您好! :)
您编写以下代码:
Respone.Write("alert("您的数据已保存!)");
Response.Redirect("UserLogin.aspx");
;);)
Hi you! :)
You write the following code:
Respone.Write("alert(''Your Data has been Saved!'')");
Response.Redirect("UserLogin.aspx");
;) ;)


执行以下操作

page_Load(..)
{
if(!ispostback)
{
button.attributes.add("onclick","alert("我在移动);");
}
}

&在按钮事件中编写移动代码

button_Click(...)
{
Response.Redirect("abc.aspx");
}
Do the following

page_Load(..)
{
if(!ispostback )
{
button.attributes.add("onclick","alert(''i am moving'');");
}
}

& in button event write moving code

button_Click(...)
{
Response.Redirect("abc.aspx");
}


这篇关于显示消息框,然后转到下一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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