CascadingDropDown 错误 - “选项” 为 null 或不是对象
我有五个与 CascadingDropDown
AJAX 控件链接在一起的 DropDownList
。 当它在本地运行时,它们工作得很好。 然而,当通过互联网在生产服务器上运行时,每次选择一个新项目时,我都会收到此错误:
'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);
}
},
有人有吗关于为什么要这样做有什么想法吗? 我怀疑这是因为通过互联网加载项目需要更长的时间,并且这会以某种方式影响控制?
我正在运行.NET 3.5。
提前致谢。
I have five DropDownList
s linked together with the CascadingDropDown
AJAX control. When it's running locally, they work fine. However when running on the production server over the internet, I get this error every time I select a new item:
'options' is null or not an object
Debugging this shows the function that's causing it (it's JS from the CascadingDropDown
control):
_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);
}
},
Does anyone have any ideas as to why it's doing this? I suspect it's because it takes longer to load the items over the internet and somehow this is affect the control?
I'm running .NET 3.5.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保下拉列表有 autopostback = "false".autopostback = "true" 给我带来了问题。
——法赫德
Make sure drop down list has autopostback = "false".autopostback = "true" was causing the problem for me.
- Fahad