Getting the parent frame querystring

  • Thread starter Thread starter Amadelle
  • Start date Start date
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
 
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
 
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
 
Back
Top