框架页面代码:Room.aspx<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<frameset rows="52,*,200" frameborder="no" border="0" framespacing="0">
<frame src="head.aspx" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
<frame src="main.aspx" name="mainFrame" id="mainFrame" title="mainFrame" />
<frame src="foot.aspx" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" title="bottomFrame" />
</frameset>
<noframes><body>
</body></noframes>
</html>
另一个页面跳转到Room.aspx页面时带有参数,Room.aspx?id=1;那么框架内的页面如何获得id=1?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<frameset rows="52,*,200" frameborder="no" border="0" framespacing="0">
<frame src="head.aspx" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
<frame src="main.aspx" name="mainFrame" id="mainFrame" title="mainFrame" />
<frame src="foot.aspx" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" title="bottomFrame" />
</frameset>
<noframes><body>
</body></noframes>
</html>
另一个页面跳转到Room.aspx页面时带有参数,Room.aspx?id=1;那么框架内的页面如何获得id=1?
顶
public string id
{
get{return Request.QueryString["id"]==null?"":Request.QueryString["id"].ToString();}
}
topFrame.Attributes["src"] = "head.aspx?id="+id;