如何将下拉列表绑定到txt文件 [英] how to bind dropdownlist to txt file
本文介绍了如何将下拉列表绑定到txt文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个txt文件
1,劳动
2,访员
我想把它放在下拉列表中
I have a txt file
1,Labour
2,Interviewer
I want to put this in dropdown list
推荐答案
该论坛主题应为您提供帮助- ^ ].
This forum thread should help you - How to populate a dropDownList from a text file[^].
尝试这个.. :)
try this.. :)
List<string> usernames = new List<string>();
usernames = File.ReadAllLines(@"E:\raju.txt").Select(x => x.Split('_')[0]).ToList();
foreach (var user in usernames)
{
ddl.Items.Add(user);
//Response.Write(user);
}
</string></string>
如何从文本文件填充dropDownList RSS [ ^ ]
如何用文本文件项填充组合框! [ ^ ]
文本文件中的组合框项目 [ ^ ]
How to populate a dropDownList from a text file RSS[^]
How to fill combobox with text file item![^]
Combobox Items From A Text File[^]
这篇关于如何将下拉列表绑定到txt文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文