Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem with get values from IFRAME

Problem with get values from IFRAME

Scheduled Pinned Locked Moved ASP.NET
csharpvisual-studiohelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    c ivan
    wrote on last edited by
    #1

    Hi, i have one problem. I create web site in VS.2008 on .NET 3.5. On my parent page i have iframe which source attribute src i populate dinamically in code behind : HtmlControl frame1 = (HtmlControl)this.FindControl("ifrCache"); frame1.Attributes["src"] = "form.aspx?form=" + formID; Iframe source is child page who have input text field. Is there any way to get value of input text fields on parent page from iframe source page?

    E 1 Reply Last reply
    0
    • C c ivan

      Hi, i have one problem. I create web site in VS.2008 on .NET 3.5. On my parent page i have iframe which source attribute src i populate dinamically in code behind : HtmlControl frame1 = (HtmlControl)this.FindControl("ifrCache"); frame1.Attributes["src"] = "form.aspx?form=" + formID; Iframe source is child page who have input text field. Is there any way to get value of input text fields on parent page from iframe source page?

      E Offline
      E Offline
      Expert Coming
      wrote on last edited by
      #2

      Yes, you can access the controls on the IFrame page just like you did with this:

      c#ivan wrote:

      HtmlControl frame1 = (HtmlControl)this.FindControl("ifrCache");

      You have to do it on the IFrame Document though, but same idea.

      The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo

      C 1 Reply Last reply
      0
      • E Expert Coming

        Yes, you can access the controls on the IFrame page just like you did with this:

        c#ivan wrote:

        HtmlControl frame1 = (HtmlControl)this.FindControl("ifrCache");

        You have to do it on the IFrame Document though, but same idea.

        The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo

        C Offline
        C Offline
        c ivan
        wrote on last edited by
        #3

        Another problem is that HtmlControl frame1 = (HtmlControl)this.FindControl("ifrCache"); return null but i add runat=server to ifrCache so i can use it like server control and it works. The same problem still persists. I do not know how to access to controls in iframe? Is it javascript solution? :((

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups