Selectedindexchanged 事件中的下拉列表选定值
我正在使用 Vb.net 在 asp.net 网站上工作,我有一个带有 autopostback = true 的下拉列表,当我更改项目时我需要获取选定的值,或者我想获取触发 selectedindexchanged 事件的项目..
任何请帮忙..
I'm working on asp.net website with Vb.net and I have a dropdownlist with autopostback = true and I need to get the selected value when I change the item or I want to get the item which fires the selectedindexchanged event ..
any help please..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在即。你的Page_Load设置
然后像这样编写事件处理程序:
确保在你的Page_Load中你在设置组合框默认值之前编写了这个,否则你最终会发现它总是被选中的项目:
In ie. your Page_Load set
Then write the event handler like this:
Make sure that in your Page_Load you write this before setting the combobox default value or you will end up with this always being the selected item:
试试这个:
try this:
如果项目是字典:
If item is a Dictionary: