Variable in SCR in an Iframe

Discussion in 'ASP.NET 2.0' started by wisemx, Jan 14, 2008.

  1. I have an .aspx page which gets a value pasted to it from a textbox on the previous page.

    The value I can display in a label on the new page. However, I want to add it to the hyperlink in the Iframe search. I have tried several ways to do this yet nothing has worked so far.

    The variable is called link. I currently have the complete URL in the variable.

    The variable is set as a string

    How do I call the variable to place it in the src in the iframe?
     
  2. Thanks for the help. I have the user enter in information on the previous web page in a text box. On the web page they are transferred to I take the information entered into the textbox and build the link.

    So I call the link variable: iframeurl

    I can put the variable in a label and it looks correct.

    However, I can't get the ifram to view it.




    <iframe name="I1" width="908" height="405"





    src="<%#iframeurl %>">


    Your browser does not support inline frames or is currently configured not to display inline frames.


    </iframe> </center> </td>





    I have tried several different ways to have the variable show up correctly in the code. Yet, I have not be able to. In this one it tells me it isn't declared. If I place a link in the code like http://www.cnn.com then the variable prints out fine in the label text box above. I have the variable defined as a string. So any ideas?


    Thanks,


    Larry
     
  3. OK mun...Let's talk about the actual purpose, see if we can think of a better approach.

    Do you actually need IFrames?
    Admittedly in the past I used them in ASP pages to display data but had to force the pages to known versions of IE.

    If you wanted to load remote Word documents they work pretty good.

    But for ASP.NET pages I'm certain we can come up with something better for you.

    So...What is it you'd like to do?
    Salute,
    Mark
     
  4. I am pulling a webpage with the iframe which contains related information from another website. I could use a regular frame to access the information however, I like the control I have with the iframe. I have been able to get the webpage to pull through with the iframe in the last 60 mins. However, I am still unable to get it when I am using master pages. Master pages seem to be a nice feature yet they are a headache so far for me with variables.


    So any idea on another option besides the iframe?


    Larry
     

Share This Page