Response.Write("<script>alert('The system makes a mistake, please contact with the manager!!');</script>");
这是我做的一个消息窗体,怎么点击完后,不能跳回我的首页,只能返回本页如果是
Response.Redirect ("index.apsx");那就弹不出消息窗体。
我想实现,即有消息窗体,又能跳转。怎么实现?
解决方案 »
- asp.net 用 WebBrowser 控件如何控制只打印(预览)选定部分
- 谁有SLVisifire.Charts 4.1.4.0 dll 无水印版
- 请教:做一个WEB自定义控件其中涉及数据库访问,求方便设置数据连接字符串和预览效果的方法。
- 三层结构中,表单验证写在业务层?
- 针对七八十万条的数据表做每个字段匹配查询,用什么方法可以提高其性能,求助!
- textbox 宽度怎么设置??
- ASP.NET的开发工具是什么啊?
- cc域名的cookies跨域问题
- asp.net里面怎么样请求执行asp页面?在线等待!!谢谢!!
- javascript的window.open不能用
- 正则表达式 不支持相同5位以上数字的填写,如11111或78511111
- asp.net中怎样验证ip的输入是否正确,高手帮帮忙啊!
Response.Redirect ("index.apsx");
这样就可以了,下面紧跟着,跳转
/// <summary>
/// 为用户弹出警告提示框
/// </summary>
/// <param name="key">警告KEY</param>
/// <param name="Message">警告消息</param>
public static void ShowMessageBox(string key,string Message)
{
Page p = (Page)System.Web.HttpContext.Current.Handler;
p.ClientScript.RegisterStartupScript(p.GetType(), key, "<script>alert('"+Message+"');</script>");
}
/// <summary>
/// 为用户弹出警告提示框
/// </summary>
/// <param name="key">警告KEY</param>
/// <param name="Message">警告消息</param>
/// <param name="GoToUrl">跳转的URL</param>
public static void ShowMessageBoxToUrl(string key, string Message, string GoToUrl)
{
Page p = (Page)System.Web.HttpContext.Current.Handler;
p.ClientScript.RegisterStartupScript(p.GetType(), key, "<script>alert('" + Message + "');window.location='" + GoToUrl + "'</script>");
}