Click here to Skip to main content
15,885,990 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Updated 28-Nov-12 18:39pm
v2

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[^]
 
Share this answer
 
Comments
Arun kumar Gauttam 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
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.
 
Share this answer
 
Comments
Arun kumar Gauttam 29-Nov-12 5:23am    
Thanks,abhi try kiya nahi hai par sayad ye kaam kar jayega
Found the solution:

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

 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900