TR wrote:
Given the following frameset named MyFrameSet.htm:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head><TITLE>La unchFrame</TITLE>
<FRAMESET ROWS="88%,12%">
<FRAME id='frame1' name='frame1' SRC="placeholde r.htm" >
<FRAME id='frame2' name='frame2' SRC="Game.aspx" >
</FRAMESET>
</head>
</html>
and given the fact that another page, Temp.htm, opens MyFrameSet.htm in
this way, setting a query string value:
<a href='MyFrameSe t.htm?player=99 9'>Open the frameset</a>
Is it possible for *server-side* code in Game.aspx (loaded into frame2)
to obtain the query-string value for "player" (i.e. 999)?
Thanks for the help!
TR
You can do so by using "aspx" frameset file. However, most people think
it is not a good method.
"in webform.aspx.cs "
e.g.
public class WebForm1 : System.Web.UI.P age
{
private void Page_Load(objec t sender, System.EventArg s e)
{
// Put user code to initialize the page here
}
#region Web Form Designer generated code
override protected void OnInit(EventArg s e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeCompo nent();
base.OnInit(e);
}
private void InitializeCompo nent()
{
this.Load += new System.EventHan dler(this.Page_ Load);
}
#endregion
public string GetFrame1()
{
return "<frame name=\"top\" src=\"http://www.microsoft.c om\" >";
}
public string GetFrame2()
{
string param=Request.P arams["abcd"];
return "<frame name=\"top\"
src=\"http://msdn.microsoft. com?abcd="+para m+"\" >";
}
}
"in webform.aspx"
<html>
<head>
<title>WebForm1 </title>
<meta name="GENERATOR " Content="Micros oft Visual Studio 7.0">
<meta name="CODE_LANG UAGE" Content="C#">
<meta name="vs_defaul tClientScript" content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</head>
<frameset rows="*,*">
<%=GetFrame1()% >
<%=GetFrame2()% >
</frameset>
</html>
--
Jacky Kwok
ja***@alumni.cu hk.edu.hk ja***@compose.c om.hk