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 19:19pm
Edited 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 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;
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 OriginalGriff 330
1 Maciej Los 180
2 Richard MacCutchan 115
3 arvind mepani 104
4 Tino Fourie 92


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