Getting the parent frame querystring

A

Amadelle

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
 
A

Alan Corbett

In Javascript, use:

window.top.MYFRAMENAME to get to a specific frame.
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
 
A

Amadelle

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
In Javascript, use:

window.top.MYFRAMENAME to get to a specific frame.
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top