【发布时间】:2013-07-03 13:23:44
【问题描述】:
我有一个带有 iframe 的 .aspx 页面:
<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");
有什么建议吗?提前致谢。
【问题讨论】:
-
这是不可能的。你想达到什么目的?
-
最好使用用户控制好友
标签: asp.net iframe code-behind