我有一个.aspx页面中有一个iframe:从父代码隐藏的iframe访问.NET控件
<iframe src="SearchAdv.aspx" id="advSearch" runat="server" frameborder="0" scrolling="no" width="100%" height="500px;" ></iframe>
而iframe指向具有几个控件的aspx页面我需要访问,例如:
<asp:dropdownlist id=ddColumn1 runat="server" AutoPostBack="True" Width="270px" onselectedindexchanged="ddColumn1_SelectedIndexChanged"></asp:dropdownlist>
我需要从父代码隐藏中获取iFrame中的下拉列表的值。我试过以下,但得到空引用错误:
DropDownList DDCol1 = (DropDownList)advSearch.FindControl("ddColumn1");
有什么建议吗?提前致谢。
这是不可能的。你想达到什么目的? –
它更好地使用用户控制伙伴 – Manish