C#怎么获取框架页中地址栏的地址?
我试了好几种,获取的都是子页面的地址。。。
有什么办法可以获取地址栏的地址吗?
[解决办法]
使用js传递吧
top.location.href就是
[解决办法]
你或者在框架的Page_Load里面记录下来,存到Session或者Cookie里面
框架页
- HTML code
<%@ Page Language="C#" %><script runat="server"> protected void Page_Load(object sender, EventArgs e) { HttpCookie h = new HttpCookie("url", Request.RawUrl); Response.Cookies.Add(h); }</script><frameset cols="90,*"><frame src="1.aspx"/><frame src="2.aspx"/></frameset>