Client side IFRAME - Postback

Discussion in 'ASP .Net' started by Jason, Nov 26, 2003.

  1. Jason

    Jason Guest

    Hi

    I have client side script that inserts an IFrame into a table cell upon a
    particular client side click event. My problem is that when a postback
    occurs, that IFrame "disappears". what do i do to work around this??

    Thanks
    Jason
     
    Jason, Nov 26, 2003
    #1
    1. Advertising

  2. During postback, you can check for some input and the create iframe in
    codebehind. For creating iframe check out this example

    System.Web.UI.HtmlControls.HtmlGenericControl iframe = new
    HtmlGenericControl("iframe");
    iframe.Attributes.Add("src", "./yourpage.aspx");
    iframe.Attributes.Add("width", "240px");
    iframe.Attributes.Add("height", "200px");
    iframe.Attributes.Add("frameborder", "0");
    this.FindControl("Form1").Controls.Add(iframe);


    --
    Saravana
    Microsoft MVP - ASP.NET
    www.extremeexperts.com



    "Jason" <> wrote in message
    news:...
    > Hi
    >
    > I have client side script that inserts an IFrame into a table cell upon a
    > particular client side click event. My problem is that when a postback
    > occurs, that IFrame "disappears". what do i do to work around this??
    >
    > Thanks
    > Jason
    >
    >
     
    Saravana [MVP], Nov 27, 2003
    #2
    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. Boss302
    Replies:
    0
    Views:
    1,084
    Boss302
    Nov 21, 2006
  2. Bogdan
    Replies:
    2
    Views:
    678
    Bogdan
    Jun 9, 2008
  3. Zoe Hart
    Replies:
    1
    Views:
    389
    Scott Wisniewski
    Jan 8, 2004
  4. TR
    Replies:
    0
    Views:
    282
  5. Daedalous
    Replies:
    3
    Views:
    787
    Daedalous
    Jan 16, 2004
Loading...

Share This Page