具有相同 ID“DXSelBtn0”的多个控件;被发现。 FindControl 要求控件具有唯一 ID
当我按下按钮时出现此错误,但我搜索了 ID“DXSelBtn0”但找不到它。按钮是一个Devexpress按钮,我只是添加点击事件而已。当我删除该事件时,我没有收到该错误。我应该怎么办?
谢谢 穆罕默德·谢里夫·托兹鲁
I got this error when i press a button, but i searched for that ID 'DXSelBtn0' i couldn't find it. Button is a Devexpress button, and i just add click event to it thats all. When i delete the event, i don't get that error. What should i do?
Thanks
Mehmet Şerif Tozlu
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我建议您创建未绑定的列,如以下主题中所述:
http:// Documentation.devexpress.com/#AspNet/CustomDocument3732
I would suggest that you create unbound columns instead as it is described in the topic available at:
http://documentation.devexpress.com/#AspNet/CustomDocument3732
如果您以编程方式创建按钮,请确保将控件的 Id 显式设置为唯一的值。或者,如果您处于循环中,请确保为每个控件显式定义唯一的 ID。
If you are creating the button programatically, make sure you explicitly set the Id of the control to something unique. Or if you are in a loop, make sure you explicitly define a unique id for each control.
DXSelBtn 是一个前缀,用于为 ASPxGridView 的命令列中的选择复选框生成 ID。我倾向于认为你正在以某种方式操纵网格。抱歉,如果没有您的代码,则无法判断导致此问题的原因。
The DXSelBtn is a prefix used to generate IDs for select checkBoxes in the command column of the ASPxGridView. I tend to think that you are manipulating the grid in some way. Sorry, it is impossible to tell what causes this issue without your code.