获取DropDownList asp.net的索引

时间:2010-05-28 21:25:02

标签: asp.net vb.net drop-down-menu

我想在DropDownList

中获取指定索引的值

1 个答案:

答案 0 :(得分:7)

DropDownList ddl = YourDropDownList;
//this
ddl.SelectedItem;
//or this
ddl.SelectedValue;
//or this
ddl.Items[ddl.SelectedIndex];

你所追求的那些?