Click here to Skip to main content
12,510,836 members (57,259 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
I have a search page, and My Page Url is ("search.aspx?id1=8"),
And I Use iFrame in This Page,
So my problem is, i am not able to access this id1 querystring in Iframe Page,

I Try This in IFrame Page: Int32 id1 = Convert.ToInt32(Request.QueryString["id1"]);
Posted 27-Nov-12 19:19pm
Updated 28-Nov-12 18:39pm
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

You can get the querystring of the parent page using javascript on your iframe page .
Please chk the link for your reference
http://stackoverflow.com/questions/7962646/how-to-get-the-querystring-from-a-parent-pag[^]
  Permalink  
Comments
Arun1990 29-Nov-12 3:23am
   
I use Your Method:
But Now Problem is how i access this javascript Fuction in Aspx.cs page, and how assign this value to string variable, plz help me,

I want use it Like ::::
string new=getQueryString().name;
‫محم د‬‎ 19-Nov-14 1:15am
   
i dont want to acces parent queryString !
I want to acces iframe queryString
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

one of the method is .. you can call this function on page load & get value from this function & store that value in a input type=hidden variable .
You can access this hidden variable anywhere in your code.
  Permalink  
Comments
Arun1990 29-Nov-12 5:23am
   
Thanks,abhi try kiya nahi hai par sayad ye kaam kar jayega
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

Found the solution:

I could pass the parameter when calling the page in the source of the iframe...
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160929.1 | Last Updated 29 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100