selectedIndex总是返回0

selectedIndex总是返回0

本文介绍了dropDownList selectedIndex总是返回0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! Hello everyone, 页面结构 页面 - >放置持有人 - >网络用户控制 - >下拉列表 这是我的页面元素。有一个click事件来生成新的webUserControl并将它放到PlaceHolder上。 现在我的问题是 我在webUserControl里面有三个Dropdownlist 和dropdownlist的所有值都从xml文件填充。 这里有一些图片来澄清我的问题 所有都在WebUserControl中,它将动态创建关于Click事件的发生 1)假设这是我的第一个下拉列表 - > i)DropdownlList 2)现在假设我从dropdownlist1中选择了动词选项,其他dropdownlist2将可见并根据dropdownlist1选项填充其中的项目 3)**现在主要问题从这里开始,** 当我点击辅助选项时 ,我应该得到辅助文本的索引。它是3.但它总是返回索引0 这个dropDownList不保持所选的值。 请提出解决此问题的建议。 感谢您解决方案 Hello Everyone,Page StructurePage -> Place Holder -> web User control -> DropdownlistsThis is my Page Elements. There is click event to generate new webUserControl and place it onto PlaceHolder.Now my Problem is thatI have three Dropdownlist inside webUserControland all values of dropdownlist populates from xml files.Here is some Images to clarify my Problem"All are inside WebUserControl which will created dynamically on the occurance of Click event"1) suppose this is my first Drop down list -> i) DropdownlList2) Now suppose I am selected "verb" option from dropdownlist1 automatically other dropdownlist2 will be visible and populates items in it according to dropdownlist1 selection3) **Now main Problem starts here, **when I am clicked on "Auxiliary" option, I am supposed to get index of Auxiliary text. It is 3. but it always returns index 0this dropDownList does not hold the selected value.Please give suggesions to resolve this problem.Thanking you 解决方案 这篇关于dropDownList selectedIndex总是返回0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-26 04:51