问题描述
该页面超时后会自动跳到main框架里面显示,怎么让他在新页面显示啊??代码如下:if(Session["name"]==null){Response.Redirect("index.aspx",true);}///////////////////////<framesetrows="10%,*"framespacing="0"noresize="noresize"scrolling="no"border="0"><framesrc="Talk.aspx"scrolling="no"><framesetcols="15%,*"border="0"><framesrc="Send.aspx"noresize="noresize"><framename="main"id="main"src="Add_AccountInfo.aspx"scrolling="Auto"></frameset></frameset>
解决方案
解决方案二:
if(Session["name"]==null){Page.ClientScriptManager.RegisterStartupScript(this.GetType(),"","<scriptlanguage=javascript>window.open('index.aspx','','width=780,height=550');</script>");}
解决方案三:
if(Session["name"]==null){Response.Write("<script>window.open('index.aspx');</script>");//会被阻止,不建议另开窗口}
解决方案四:
windows.open()
解决方案五:
1楼有误,应该为:Page.ClientScript.RegisterStartupScript(this.GetType(),"","<scriptlanguage=javascript>window.open('index.aspx','','width=780,height=550');</script>");
解决方案六:
window.parent.replace("index.aspx");