【问题标题】:CascadingDropDown Error - 'options' is null or not an objectCascadingDropDown 错误 - “选项”为空或不是对象
【发布时间】:2009-03-05 14:41:00
【问题描述】:

我有五个DropDownLists 与CascadingDropDown AJAX 控件链接在一起。当它在本地运行时,它们工作正常。但是,当通过 Internet 在生产服务器上运行时,每次选择新项目时都会出现此错误:

'options' is null or not an object

调试它会显示导致它的函数(它是来自 CascadingDropDown 控件的 JS):

_clearItems : function() {
    /// <summary>
    /// Clear the items from the drop down
    /// </summary>
    /// <returns />

    var e = this.get_element();
    while (0 < e.options.length) {
        e.remove(0);
    }
},

有没有人知道它为什么这样做?我怀疑这是因为通过 Internet 加载项目需要更长的时间,并且不知何故这会影响控件?

我正在运行 .NET 3.5。

提前致谢。

【问题讨论】:

  • var e = this.get_element();执行此操作后, e 是否为空?

标签: .net asp.net ajax drop-down-menu cascadingdropdown


【解决方案1】:

确保下拉列表有 autopostback = "false"。autopostback = "true" 是我的问题。 - 法赫德

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-05-01
    • 2013-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-27
    相关资源
    最近更新 更多