IFrame跳出问题(其实不难) 一个页面(main.aspx)用了3个IFrame嵌套了3个页面,想从某一个里面写个方法把当前的整个页面(main.aspx)替换成baidu.com 改怎么做?希望得到尽可能多的方法,谢谢~! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在页面中写上top.location.href='http://www.baidu.com' window.top.location.href = 'baidu.com'; 还有吗?这种方法会吧上次?号后面挂的值加在baidu.com后面的······目前我就是用的这种方法,结果变成 baidu.com?userid=001 这个重新定向,绝对不会带任何参数。baidu.com?userid=001这个是不可能的。 parent.parent.location.href = "baidu.com" protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request["MyDep"] != null && Request["MyNum"] != null && Request["MyName"] != null && Request["Dep_Limit"] != null && Request["ManagerId"] != null) { Session["MyDep"] = Request["MyDep"].Trim(); Session["MyNum"] = Request["MyNum"].Trim(); Session["MyName"] = Request["MyName"].Trim(); Session["Dep_Limit"] = Request["Dep_Limit"].Trim(); Session["ManagerId"] = Request["ManagerId"].Trim(); } } } protected void ImageButton2_Click(object sender, ImageClickEventArgs e) { Session.Clear(); if (Request["path"] != null) { this.Page.RegisterStartupScript("", "<script>top.location.href = '192.168.2.26/Login.aspx'</script>"); } else { this.Page.RegisterStartupScript("", "<script>top.location.href = 'login.aspx'</script>"); } }结果返回的地址是192.168.2.26/Login.aspx+第一个if里面判断的所有request挂的值 有没有办法可以清空 所有Request??? 你看看login.aspx是不是做了什么处理 没做什么处理,就是把下面的request全部传了过来Request["MyDep"]!=null&& Request["MyNum"]!=null&& Request["MyName"]!=null&& Request["Dep_Limit"]!=null&& Request["ManagerId"]!=null晕啊······················ 你这些代码Request["MyDep"]!=null&& Request["MyNum"]!=null&& Request["MyName"]!=null&& Request["Dep_Limit"]!=null&& Request["ManagerId"]!=null是在login.aspx.cs中吗 parent.parent.location.href = "baidu.com" 各位不用说了,其实是location里面会预留当前地址栏内的地址,所以location.href = "baidu.com"会在当前地址后面加上去问题还没解决,决定避开问题来考虑················撒分 top.location.href = 'http://192.168.2.26/Login.aspx' 请教如何调用Jquery方法 60分啦,,, 怎么解决这个乱码? FileUpload控件如何设置点浏览时弹出的选择文件窗口为图片类型(默认为所有类型) 访问站点,老是提示要求输入用户名密码 高手进:ASP.NET中引用C++编写的DLL问题 请教一个asp的session问题? asp.net网站后台怎样设置数据库备份 工行的B2C在线支付接口问题? 各位大哥,关于frame的问题 模板内容页获取模板js值 UpdatePanel里获取焦点后输入法的问题!谢谢
top.location.href='http://www.baidu.com'
window.top.location.href = 'baidu.com';
还有吗?
这种方法会吧上次?号后面挂的值加在baidu.com后面的······目前我就是用的这种方法,结果变成 baidu.com?userid=001
baidu.com?userid=001这个是不可能的。
{
if (!IsPostBack)
{
if (Request["MyDep"] != null && Request["MyNum"] != null && Request["MyName"] != null && Request["Dep_Limit"] != null && Request["ManagerId"] != null)
{
Session["MyDep"] = Request["MyDep"].Trim();
Session["MyNum"] = Request["MyNum"].Trim();
Session["MyName"] = Request["MyName"].Trim();
Session["Dep_Limit"] = Request["Dep_Limit"].Trim();
Session["ManagerId"] = Request["ManagerId"].Trim();
}
}
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
Session.Clear();
if (Request["path"] != null)
{
this.Page.RegisterStartupScript("", "<script>top.location.href = '192.168.2.26/Login.aspx'</script>");
}
else
{
this.Page.RegisterStartupScript("", "<script>top.location.href = 'login.aspx'</script>");
}
}结果返回的地址是192.168.2.26/Login.aspx+第一个if里面判断的所有request挂的值
你这些代码Request["MyDep"]!=null&& Request["MyNum"]!=null&& Request["MyName"]!=null&& Request["Dep_Limit"]!=null&& Request["ManagerId"]!=null
是在login.aspx.cs中吗
问题还没解决,决定避开问题来考虑················撒分