title: Accessing .Net Controls in an iFrame from Parent Codebehind
body: <p>I have a .aspx page with an iframe: </p>
  
  <pre><code>&lt;iframe src="SearchAdv.aspx" id="advSearch" runat="server" frameborder="0" scrolling="no" width="100%" height="500px;" &gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>The iFrame points to an aspx page that has several controls I need to access, example:</p>
  
  <pre><code>&lt;asp:dropdownlist id=ddColumn1 runat="server" AutoPostBack="True" Width="270px" onselectedindexchanged="ddColumn1_SelectedIndexChanged"&gt;&lt;/asp:dropdownlist&gt;
  </code></pre>
  
  <p>I need to get the value of the dropdown list that's in the iFrame from the parent codebehind. I've tried the following but get a null reference error:</p>
  
  <pre><code>DropDownList DDCol1 = (DropDownList)advSearch.FindControl("ddColumn1");
  </code></pre>
  
  <p>Any suggestions? Thanks in advance. </p>