473,569 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FRAMESET and QueryString

TR
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
Nov 18 '05 #1
2 2274
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
Nov 18 '05 #2
Many thanks for the example, Jacky!
Timo

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3531
by: Hans | last post by:
Hi There, I have a page that has links with some variables and I need to open the results set in a frameset. I have tried doing this in various different ways, but still cannot get the variable passed to the relevant frames within the frameset. What is the best way of getting this done. Thanks Hans
2
5073
by: luu duong | last post by:
I know this is probably easy but here is the details. I have an asp page that is not inside a frameset. I want to post data to another asp page that is inside a frameset. So firstpage.asp has action="response.htm" target="results". response.htm... <HTML> <FRAMESET ROWS="50%,50%"> <FRAME SRC="header.asp" NAME="fTop"> <FRAME...
1
10992
by: JP | last post by:
Hi, How can I create a dynamic frameset whose content changes based on user inputs? Specifically, how do I toggle a frame within a frameset? How can I allow a user to "close" or "dock" a frame by clicking on some button and let the parent update its frameset layout? What I've been trying to do is for the child frame to send a message
1
2331
by: Cantekin Guneser | last post by:
i have web application with frameset, i need to read querystring of a frame from other frame in the frameset thnks
2
2023
by: Donald | last post by:
I'm having a problem passing QueryString values to other web pages from a frame set. Here's the details of the problem: 1. I have three web forms: WorkObject.ASPX, WorkObject_Header.ASPX and WorkObject_Body.ASPX. 2. The WorkObject.ASPX web form has a FrameSet tag referencing the other two web forms. 3. The WorkObject.ASPX receives a...
3
2183
by: Kevin Attard | last post by:
Hi, First of all, I know that frames are evil but I had to use them in this app. I have a frameset with 2 frames (msdn-like environment). The frameset page has a querystring and I need to get that value from the leftframe. Any ideas? Thanks
1
3331
by: news-server.maine.rr.com | last post by:
Hi, In a nutshell, how to pass query string parameters to a frameset page and extract them using Request and then pass them to a frame src ? I have the following situation, and this may be a FAQ but I have not found the answer: A list of accounts on one aspx page like this:
12
5596
by: Geoff Cox | last post by:
Hello I'm having a problem loading a frameset file using an include in a php file. Nothing is displayed and when I look at the source code I see that <html> <head> <title></title>
4
3731
by: maminx | last post by:
Hello..i have problem, hope someone can help me..i have this frameset below : <FRAMESET ROWS="55%" COLS="37%,63%"> <FRAME NAME="runningTrade" SRC="http://runningtrade.com" scrolling="no"> <FRAMESET ROWS="33%" COLS="51%,49%"> <FRAMESET ROWS="34%,34%,35%" cols="*"> <FRAME NAME="orderBook" SRC="http://od.com" scrolling="no">...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7982
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6286
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.