I know using javascript (window.parent.location.hr
ef) may get the parent url. But within iframe there aspx web pages. How can we pass the variables in Javascript to aspx.
The reason to do this is that the functions within iframe depends on the parent url. that is, differnt parent url with the same iframe will work differently. First we can use "<iframe src ="
http://12.34.56.78/function.aspx?name=a111">
, from the QueryString "name", I can tell which parent (url) is calling the iframe. We store the "name=a111" in the session so that every aspx page get the "name=a111" from seesion and run different fucntions acccording to the "name=a111". The problem is: afterwards, if session is timeout, we lost the information of "name=a111", thus lost the information of which parent url is calling the iframe.
Our questions are:
(1) how to get the parent url from iframe written in aspx?
(2) or there are any other places than sesstion to store the information that is related with parent url?
Thanks.
Start Free Trial