Microsoft JScript 运行时错误:Sys.InvalidOperationException:两个组件具有相同的 id
我正在研究 ASP .NET 动态数据。
在我的一个编辑控件中,我希望允许用户将相关表中的记录添加到当前页面。 (从字面上看,如果您位于订单页面,您也可以在此页面上向系统添加新客户,然后将其与该订单关联)。 因此,我将 DetailsView 设置为 InsertMode,嵌套在 UpdatePanel 内,由 ModalPopupExtender 显示,单击“添加新”时调用该 ModalPopupExtender。 这个技巧在我第一次执行此过程时起作用,即添加了一个客户(并且我也更新了下拉列表)。
然而,我意识到它无法再次(正常)工作,直到我刷新整个页面。 当我连接调试器时,我最担心的事情变成了现实(好吧,不是真的)。但抛出了一个异常: “Microsoft JScript 运行时错误:Sys.InvalidOperationException:两个组件具有相同的 id。”这似乎是在抱怨日历扩展器控件是详细信息视图的一部分。
任何关于这里发生的事情的指导都会很棒。谢谢。
I'm working in ASP .NET dynamic data.
In one of my edit controls I wanted to allow the user to add records from a related table to the current page. (Literally, if you are on the orders page, you would be allowed to add a new customer to the system on this page as well, and then associate it with that order).
So, I have a DetailsView set to InsertMode, nested inside of an UpdatePanel, which is shown by a ModalPopupExtender which is invoked when 'add new' is clicked.
This doohickey works the first time i execute this process, that is, a customer is added (and i update the dropdown list as well).
However, I realized it didn't work (properly) again until I refreshed the entire page.
When I attached my debugger, my worst fears were realized (ok, not really). But an exception was being thrown:
"Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id." Which seemed to be complaining about a Calendar Extender Control that is part of the details view.
Any guidance on what's going on here would be great. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看看我的弹出控件
动态数据的弹出插入控件 我就是为了这个目的而建造它的。
have a look at my popup control
A Popup Insert control for Dynamic Data I built it for just that purpose.
我正在从文本框进行搜索,并在回发后遇到此错误。
UpdatePanel
上的UpdateMode="Conditional"
对我有用。I was working on a search from a textbox and encountered this error after postback.
UpdateMode="Conditional"
on theUpdatePanel
worked for me.您好,我得到了解决方案,
在页面的 ScriptManager 中添加 ScriptMode="Release" ,如下所示
Hello I got The Solution,
add ScriptMode="Release" in ScriptManager of Page like that