ASP: calling querystring value in iframe

Discussion in 'C#' started by cancer10, Aug 27, 2008.

  1. #1
    Hey,

    Urgent help needed.


    I have an .asp page (index.asp) and I have an <iframe src="myframe.asp"> in that .asp page.

    Is there any way I can fetch the value that is being passed in the index.asp querystring in myframe.asp page?


    so, suppose the link: http://mydomain.com/index.asp?id=5

    can I fetch that value of id in the myframe.asp page (which is the iframe page)? If yes, How?




    Thanx
     
    cancer10, Aug 27, 2008 IP
  2. SearchBliss

    SearchBliss Well-Known Member

    Messages:
    1,899
    Likes Received:
    70
    Best Answers:
    2
    Trophy Points:
    195
    Digital Goods:
    1
    #2
    Retrieving info from a query string into an iframe (which is a seperate page) cannot be done (GET method). The ASP must be on the same page. It may be possible using the POST method, sending the info to the iframe page.
     
    SearchBliss, Aug 30, 2008 IP
  3. cancer10

    cancer10 Guest

    Messages:
    364
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hey,

    I think I have solved this..

    I can pass the value to the iframe as querystring

    <iframe scr="myframe.asp?id=<%=request("id")%>"></iframe>
     
    cancer10, Aug 30, 2008 IP