如何把父页面的参数传递给各子页面
<script runat="server">void Page_Load(object sender, EventArgs e)
{
int projectid =Convert.ToInt32( Request.QueryString["projectid"]);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang ="en">
<head>
<title>根据设备名查询设备参数</title>
</head>
<form id="a" runat="server">
<frameset cols="35%,*"border="0" >
<frame src="a.aspx" id="display1" name="display1"></frame>
<frame src="Default2.aspx" scrolling="yes"></frame>
</frameset>
</form>
</html>
我如何把取得的projectid也给Default2.aspx和a.aspx?谢谢
--------------------编程问答-------------------- protected string strFram ="a.aspx?projectid="+projectid;
<frame src=<%=strFram%> id="display1" name="display1"> </frame>
just try
--------------------编程问答--------------------
<script runat="server">
void Page_Load(object sender, EventArgs e)
{
int projectid =Convert.ToInt32( Request.QueryString["projectid"]);
}
public string GetID()
{
if (Request.QueryString["projectid"] != null)
{
return Request.QueryString["projectid"].ToString();
}
else
{
return "";
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang ="en">
<head>
<title> 根据设备名查询设备参数 </title>
</head>
<form id="a" runat="server">
<frameset cols="35%,*"border="0" >
<frame src="a.aspx?id=<%=GetID()%>" id="display1" name="display1"> </frame>
<frame src="Default2.aspx?id=<%=GetID()%>" scrolling="yes"> </frame>
</frameset>
</form>
</html>
补充:.NET技术 , ASP.NET