笑故挽风 2011-01-25 12:15 采纳率: 100%
浏览 31

组合框ajax控件

i have a filter panel with 5-6 combo boxes ajax control tool kit..

i want this filter panel to be visible false by default.. and toggle it(show/hide) on client click using java script

however when i have my filter panel as visible = false runat=server java script does not get the object

and if i do code behind.. filterpanel.attributes.add("style",display:none) filterpanel.attributes.add("style",visibilty:hidden)

the combo box throws a runtime error..

i've searched on the net which says.. combo box is difficult to render inside a panel.. whose default property is initially false!

  • 写回答

3条回答 默认 最新

  • weixin_33713350 2011-01-25 12:36
    关注

    The issue is that if you set Visible="false" on a server control, it won't render any of the HTML elements, including the combo boxes. Hiding the panel using the following is AJAX friendly:

    <asp:Panel id="p" runat="server" style="display:none">
    
    </asp:Panel>
    

    Which will render a DIV and all your drop downs, but hide them from view, allowing you to toggle the div's visibility.

    评论

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型