Seven price
asked on
iframe request parent page querystring
Parent.Page.Request.QueryS tring("In" )
Hello, I tried the above to retrieve the parent page querystring but I get an error.
System.NullReferenceExcept ion: Object reference not set to an instance of an object.
in vb how can I retrieve the querystring value to pass to my parameter?
Hello, I tried the above to retrieve the parent page querystring but I get an error.
System.NullReferenceExcept
in vb how can I retrieve the querystring value to pass to my parameter?
ASKER
You did not read the entire question i suppose,
The page is in a iframe but I need the query string from the parent page the iframe lives.
The page is in a iframe but I need the query string from the parent page the iframe lives.
do you mean this?
page.aspx has an iframe inside, say name=myFrame, src=frame.aspx
you call page.aspx?in=HK and somehow you post the myFrame and in the code frame.aspx.vb you want to get the in parameter of page.aspx?
if this is the case, you should create a hidden variable in frame.aspx and set it to "in" param before submitting it on client side, either with js or when you construct the src attribute of frame
like
<iframe src='frame.aspx?in=<%=requ est("in") %>' ...>
page.aspx has an iframe inside, say name=myFrame, src=frame.aspx
you call page.aspx?in=HK and somehow you post the myFrame and in the code frame.aspx.vb you want to get the in parameter of page.aspx?
if this is the case, you should create a hidden variable in frame.aspx and set it to "in" param before submitting it on client side, either with js or when you construct the src attribute of frame
like
<iframe src='frame.aspx?in=<%=requ
or use session...
on page.aspx.vb page_load event
session("in")=request("in" )
then use session("in") in frame.aspx.vb
on page.aspx.vb page_load event
session("in")=request("in"
then use session("in") in frame.aspx.vb
ASKER
I tried a session but i thought there was another way on the server side.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ts
Request.QueryString("In")
or simply:
Request("In")