473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Getting the parent frame querystring

Hi all,
I have multiple frames which I would like to get the query string from within one of the subframes. But when I do
HttpContext.Current.Request.QueryString["section"]

or Request.QueryString["section"]

doesn't return the parent frame's querystring but the current page's querystring. I was wondering whether anyone knows how to get the parent frame's Querystring through either request object or through javascripting (I have been trying javascripting and haven't had that much success with javascript and ASP.NET combo). I can get the location and search string in javascript using window.parent.location and window.parent.location.search but I can't assign it to anything that I can use within my C# code. I better say i don't know how to assign it either to a variable or a text field or something that I can later use it within my C# code.

Well I would appreciate your help,

Thanks,

Amadelle
Nov 18 '05 #1
2 7764
In Javascript, use:

window.top.MYFRAMENAME to get to a specific frame.
"Amadelle" <am******@yahoo.com> wrote in message news:uX*************@TK2MSFTNGP14.phx.gbl...
Hi all,
I have multiple frames which I would like to get the query string from within one of the subframes. But when I do
HttpContext.Current.Request.QueryString["section"]

or Request.QueryString["section"]

doesn't return the parent frame's querystring but the current page's querystring. I was wondering whether anyone knows how to get the parent frame's Querystring through either request object or through javascripting (I have been trying javascripting and haven't had that much success with javascript and ASP.NET combo). I can get the location and search string in javascript using window.parent.location and window.parent.location.search but I can't assign it to anything that I can use within my C# code. I better say i don't know how to assign it either to a variable or a text field or something that I can later use it within my C# code.

Well I would appreciate your help,

Thanks,

Amadelle
Nov 18 '05 #2
The question was not about Javascript but about how to get the information from Javascript to C#. I know how to get to the parent frame information from Javascript .. But I don't know how to get that information passed to C#.

So if anyone knows the answer I would appreciate it... Or any work arounds. Or a direct C# method (although I doubt anything will exist here).

Thanks again,

Amadelle
"Alan Corbett" <al*********@hotmail.com> wrote in message news:uV*************@TK2MSFTNGP15.phx.gbl...
In Javascript, use:

window.top.MYFRAMENAME to get to a specific frame.
"Amadelle" <am******@yahoo.com> wrote in message news:uX*************@TK2MSFTNGP14.phx.gbl...
Hi all,
I have multiple frames which I would like to get the query string from within one of the subframes. But when I do
HttpContext.Current.Request.QueryString["section"]

or Request.QueryString["section"]

doesn't return the parent frame's querystring but the current page's querystring. I was wondering whether anyone knows how to get the parent frame's Querystring through either request object or through javascripting (I have been trying javascripting and haven't had that much success with javascript and ASP.NET combo). I can get the location and search string in javascript using window.parent.location and window.parent.location.search but I can't assign it to anything that I can use within my C# code. I better say i don't know how to assign it either to a variable or a text field or something that I can later use it within my C# code.

Well I would appreciate your help,

Thanks,

Amadelle
Nov 18 '05 #3

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

Similar topics

1
by: Bart Plessers \(artabel\) | last post by:
Hello, I am wondering if one could do following. I have a main frame with 3 subframes ("top", "left" and "contents") I have a link in the left frame, someting like: <a...
1
by: Stuart Wexler | last post by:
Let's say I have a frameset page and I want to preselect an option in a select box from the parent frame. So the parent frame would programmatically change the select box in the child frame. ...
4
by: JJ | last post by:
I'm working with a web site that has frames defined as: <frameset rows="60,*" frameborder="yes" border="0" framespacing="0" cols="*" bordercolor="#eeeeee" topmargin="0" leftmargin="0"...
4
by: John | last post by:
Hi, is it possible for a UserControl to get the Page name and querystring of its parent? e.g If a userControl is inside a page called "index.aspx?ID=66" how can a usercontrol print out this...
28
by: Stefan Mueller | last post by:
I can display the value of the following input box with alert(parent.MyFrame.document.MyForm.MyInput.value); But if the frame, the form or the input box doesn't exist I get of course an error...
4
by: many_years_after | last post by:
Hi, pythoners: My wxPython program includes a panel whose parent is a frame. The panel has a button. When I click the button , I want to let the frame destroy. How to implement it? Could the...
8
by: simonlpwaters | last post by:
I need to obtain the username of the currently logged in user on a machine. However, the program that needs to do this will be running under different credentials to the logged in user, so using...
1
by: nupuragr82 | last post by:
I have a parent form and on button click I am calling a child page where i have a textbox and a button. On button click of child form I am passing the value of the Textbox to the Textbox in parent...
1
by: michal.podlewski | last post by:
Hi All, I have a problem with a simple (as I thought till now) thing: I want to make a link in a child-window which would change site in the parent-window and along with closing child window. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.