Results 1 to 2 of 2

Thread: changing src of iframe from server side !!!HELP!!!!

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2004
    Posts
    48

    Question changing src of iframe from server side !!!HELP!!!!

    Hey all,
    I'm writing an application where I'm using an iframe to load up various dynamic information. I have a flash app that I load up in that window, that I pass values to depending on what the user selects from various drop down boxes and such. It would be alot easier to just do a popup, but unfortunately i'm not able to do that given the client.

    My problem is that I don't know how (or am able to find anythign on) to change the src of the iframe. Basically I want to change it to customize.swf?var1=" & var1 & "&var2...etc... when the users clicks to view a preview. I've tried having it run as a server control, as well as declaring it and then in the vb codebehind saying ipreview.src=bla bla bla...but it keeps saying that .src isn't "a member of 'System.Web.UI.HtmlControls.HtmlGenericControl'." I'm really running out of time and I'm not able to find anything on how to make this work... please help if you can.

    Cran56

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    You were right on track with HTMLGenericControl. Just use the AddAttributes method

    VB Code:
    1. MyIframe.Attributes.Add("src","somepage.aspx")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width