the page in an iframe is totally independent from the parent page, you cannot do that

解决方案 »

  1.   

    我会这么来控制,
    this.iframe.Attributes["src"] = "XXXX.aspx"
    你可以指定XXXX.aspx页面有某个Table控件
    如果你还想在XXXX.aspx页面里面动态来装载某个Table控件的话
    this.iframe.Attributes["src"] = "XXXX.aspx?EditType='add'&Control='XXTable'"
    不过我现在都不这么做了,什么都动态装载用户控件算了!
      

  2.   

    iframe包含的是另外一个页面,你得让那个页面动态添加控件
      

  3.   

    我遇到的问题是这样的
    在页面中动态添加层div,再在层中添加table,以次生成动态菜单,但总被dropdownlist控件挡住,听说用iframe做载体可以解决。请问各位大哥怎么动态添加ifrme啊????
      

  4.   

    the suggested way is to hide your dropdownlist with style.display="none" or style.visibility="hidden" when you expand your menu, and show the dropdownlist with style.display="" or style.visibility="visible" when you collapse your menu
      

  5.   

    如何隐藏页面中的所有dropdownlist控件,请给个例子
      

  6.   

    <script language=javascript>
    function ShowDropDowns(bShow)
    {
      var selects = document.getElementsByTagName("SELECT");
      for(var i=0; i < selects.length; i++)
    selects[i].style.visibility = (bShow? "visible":"hidden");
    }
    </script>
      

  7.   

    我用的是asp服务器控件,并且页面的dropdownlist控件的数量和位置不固定。
      

  8.   

    我用的是服务器控件〈select>好象不行啊
      

  9.   

    谢谢 saucer(思归)可以了!
      

  10.   

    on the client side, DropDownlists become HTML <SELECT>, my code above doesn't care how many selects you haveif you only need to hide some dropdownlist, trydocument.getElementById("<%=DropDownList1.ClientID%>").style.visibility = "hidden";
      

  11.   

    saucer(思归)大哥还存在一个问题
    我的页面使用一个iframe来显示菜单中的连接页面,那么在主页面中如何隐藏iframe页面中
    的dropdownlist控件??????