iFrame

Discussion in 'ASP .Net Web Controls' started by IntraRELY, Aug 8, 2003.

  1. IntraRELY

    IntraRELY Guest

    Is there a way to programatically set the src of an iFrame. I want to call
    the object directly.

    TIA,

    Steve Wofford
    www.IntraRELY.com
     
    IntraRELY, Aug 8, 2003
    #1
    1. Advertising

  2. IntraRELY

    IntraRELY Guest

    I cannot get this thing to work, I am keeping to the baics and here is all
    what I have. Is there something I am missing. In IE I click the properties
    of the IFrame and it is pulling the url http://localhost/rateQuest/<%SrcUrl.

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    Dim SrcUrl = "/depositories.aspx"
    End Sub

    Tried This
    ---------------------------------------------------------------------------
    <iframe
    id="ifContent"
    style="Z-INDEX: 102; LEFT: 8px; POSITION: absolute; TOP: 40px"
    runat="server"
    src = <%SrcUrl%>
    </iframe>

    I dont know if you had a typo in your code, but I wouldnt think there should
    of been an = sign. But get an error message that the tag was not well
    formed.
    ----------------------------------------------------------------------------
    <iframe
    id="ifContent"
    style="Z-INDEX: 102; LEFT: 8px; POSITION: absolute; TOP: 40px"
    runat="server"
    src = <%=SrcUrl%>
    </iframe>

    Thanks for your input,

    Steve Wofford
    www.IntraRELY.com


    "Ravikanth[MVP]" <> wrote in message
    news:046901c35e2c$140c2ca0$...
    > Hi
    > Try this way:
    > <iframe src = <%=SrcUrl%>>
    >
    > declare a variable in code behind SrcUrl, and assign url
    > to the variable.
    >
    > I hope this works for you.
    >
    > Ravikanth[MVP]
    >
    >
    > >-----Original Message-----
    > >Is there a way to programatically set the src of an

    > iFrame. I want to call
    > >the object directly.
    > >
    > >TIA,
    > >
    > >Steve Wofford
    > >www.IntraRELY.com
    > >
    > >
    > >.
    > >
     
    IntraRELY, Aug 9, 2003
    #2
    1. Advertising

  3. IntraRELY

    Nir Guest

    Very simple .


    set <iframe id=x runat = server> </iframe>

    In server side write :

    x.attribute.add("src",url)

    Nir Salab
    Zomet Information LTD
    Israel
     
    Nir, Aug 10, 2003
    #3
  4. IntraRELY

    MSFT Guest

    Hi Steve,

    Ravikanth has point to the right direction. You need define "ScrUrl" as
    global variant:

    Public SrcUrl As String

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    SrcUrl = "http://www.google.com"
    End Sub


    And, don't run at server for the iframe object:

    <iframe id="ifContent"
    style="Z-INDEX: 102; LEFT: 8px; POSITION: absolute; TOP: 40px"
    src = "<%=SrcUrl %>"
    </iframe>

    Hope this help,

    Luke

    "Microsoft Security Announcement: Have you installed the patch for
    Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
    you to review the information at the following link regarding Microsoft
    Security Bulletin MS03-026
    http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or to
    visit Windows Update at http://windowsupdate.microsoft.com to install the
    patch. Running the SCAN program from the Windows Update site will help to
    insure you are current with all security patches, not just MS03-026."
     
    MSFT, Aug 12, 2003
    #4
  5. IntraRELY

    IntraRELY Guest

    Thanks for your input all.

    Steve Wofford
    www.IntraRELY.com

    "Nir" <> wrote in message
    news:...
    > Hi MSFT .
    >
    > According to your solution ,
    > U must call DataBind() function at the end of page_load routines.
    >
    > Nir
     
    IntraRELY, Aug 12, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    685
  2. mi
    Replies:
    4
    Views:
    13,644
    dorayme
    May 21, 2008
  3. elca
    Replies:
    0
    Views:
    580
  4. Scott
    Replies:
    6
    Views:
    958
    [MSFT]
    Apr 14, 2004
  5. Daedalous
    Replies:
    3
    Views:
    712
    Daedalous
    Jan 16, 2004
Loading...

Share This Page