Hashtable ht=new Hashtable();
ht.Add("First","fvalue");
ht.Add("Second","svlaue");
ListBox1.DataTextField ="key";
ListBox1.DataValueField ="value";
ListBox1.DataSource =ht;
ListBox1.DataBind();
在可以多选的情况下,为什么这样得不到值呢》
string a;
a="";
foreach (ListItem t in ListBox1.Items)
{
if (t.Selected )
a=a+t.Text ;
}
Label1.Text =a;
如单选,该怎么得到值呢?谢谢了!急