Click here to Skip to main content
Rate this: bad
good
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 20:19pm
Edited 28-Nov-12 19: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 at 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;
‫محم د‬‎ at 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 at 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...
 
<iframe src="myframe.asp?id=<% =request.Querystring(" id=")%>"></iframe>
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 450
1 OriginalGriff 180
2 DamithSL 130
3 Dave Kreskowiak 120
4 Suvendu Shekhar Giri 110
0 OriginalGriff 7,645
1 DamithSL 5,614
2 Sergey Alexandrovich Kryukov 5,344
3 Maciej Los 4,961
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web03 | 2.8.141223.1 | Last Updated 29 Nov 2012
Copyright © CodeProject, 1999-2014
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