2012-04-03 72 views
0

如何填寫基於下拉選擇
我有一個表中的文本框:填充文本框時選擇值形式下拉

empid empshortname empname empdesignation 

當我從下拉是選擇empshortname應該是填補empname在一個文本框,empdesignation在這樣的另一個文本框,我想基於單一選擇

由於填補許多文本框,並認爲
sreedhar

回答

0

我明白,你想採取從下拉列表中值empshortName,並根據其選擇DB的他人財物或者地方.. 這樣,才能得到所選擇的值empshortName寫了一個事件函數:SelectedIndexChanged並且有寫:

string empName=dropdown.Items[dropdown.selectedIndex].value;//to get the key value 
or: 
    string empName=dropdown.Items[dropdown.selectedIndex].Text; //to get the display text 
+0

感謝您接受我的回答。請投票給它,如果你不介意的話... – 2012-05-09 06:51:54