如何从DropDrown列表中获取所选项目 [英] How to get selected item from DropDrown list

查看:129
本文介绍了如何从DropDrown列表中获取所选项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jquery插件

http://harvesthq.github.io/chosen/ [ ^ ]


在DropDownlist的Gridview中






现在我想获得多个选中的项目



I have use jquery plugin
http://harvesthq.github.io/chosen/[^]


in Gridview on DropDownlist

now i want to get those item which are multiple selected

foreach (ListItem item in drop.Items)
           {

               if (item.Selected)
               {


                   Item += "," + item.Value;
               }
           }





但这个循环总是给我第一个选中的值



请帮助获取所有值



but this loop always gives me 1st value which is selected

please help to get all values

推荐答案

我忘了选择Mode propery
I forgot to selection Mode propery

这篇关于如何从DropDrown列表中获取所选项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆