如何插入下拉列表中的数据? [英] how to insert data of dropdown list ?

查看:75
本文介绍了如何插入下拉列表中的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获取下拉列表的值.所有这些值都在String中.前任.
婚姻状况:
已婚
未婚
寡妇

但在枚举文件中,我已通过
声明了它们 已婚= 1
未婚= 2
丧偶= 3.

因此,如果我选择寡妇,那么我必须得到3.从该下拉列表中如何获取int值?

I want to take value of drop down list.. All those values are in String. Ex.
MArital Status:
Married
UnMarried
Widowed

but in enum file i have declared them by
married = 1
unmarried = 2
widowed = 3.

so if i select widowed then i must get 3. how can i get int value from this drop down list ???

推荐答案

获取数组/列表中的所有数据并将该数组绑定到dropdownlist
take all the data in array / list and bind that array into dropdownlist


这篇关于如何插入下拉列表中的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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