title: How to access controls which are placed in iframe
body: <p>I have a page a.aspx, which has an iframe whose source is ‘controlsPage.aspx’
  Now referring a websource control object I am trying to find controls of ‘controlsPage.aspx’ , but the controls are not traceable. </p>
  
  <p>Our Code:</p>
  
  <pre><code>wbSource.Navigate("localhost:12122//a.aspx")
  Dim frameCollection As HtmlElementCollection = wbSource.Document.Window.Frames("ChildFrame").Document.GetElementsByTagName("Span")
  </code></pre>
  
  <p>Here we are getting count of frameCollection as 0</p>
  
  <p>Main Page -> a.aspx </p>
  
  <pre><code>&lt;html&gt;
     &lt;body&gt;
           &lt;iFrame id = “ChildFrame” src = “controlsPage.aspx”&gt;
           &lt;/iFrame&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Frame Page  controlsPage.aspx          </p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
          &lt;asp:label Text=”Source Page”/&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>