model popup with iframe

Last post 09-21-2008 2:17 PM by nvanhaaster@resultstel.com. 3 replies.

Sort Posts:

  • model popup with iframe

    09-21-2008, 12:55 PM
    • Member
      84 point Member
    • danishjee
    • Member since 10-31-2007, 11:06 AM
    • Pakistani
    • Posts 548

    Hi im using model popup with iframe.now problem is how can i get value on my page from iframe.I am using iframe on my model popup. I wana get those inside iframe values on my main page inside gridview.

     Thanks

  • Re: model popup with iframe

    09-21-2008, 1:51 PM

    if you add runat="server" id="iframeid" in your code behind you can get this

    string iframeUrl = iframeid.Attributes["src"].ToString()

  • Re: model popup with iframe

    09-21-2008, 2:09 PM
    • Member
      84 point Member
    • danishjee
    • Member since 10-31-2007, 11:06 AM
    • Pakistani
    • Posts 548

    thanks for your fast reply.

     would u please give me a little example with this code to understand me...

    thanks

  • Re: model popup with iframe

    09-21-2008, 2:17 PM
    Answer

     i dont really have an example of the code. The idea is a iframe like this

     <iframe runat="server" id="iframe1" src="http://someurl.com" />

    then your code behind {C#}

     

    protected void Page_Load(object s,EventArgs e)
    {
          string iframeUrl = iframe1.Attributes["src"].ToString();
          TextBox1.Text = iframeUrl;
    }
        
Page 1 of 1 (4 items)