Happy Progra mming! - Scott Mitchell mi ****** @ 4guysfromrolla.com http ://www.4GuysFromRolla.com http://www.ASPFAQs。 com http://www.ASPMessageboard.com *当你想到ASP时,请考虑4GuysFromRolla.com!Perhaps an easier approach would be to just programmatically step throughthe lines of code and add it to the DropDownList''s Items collection.Something like:StreamReader sr = File.OpenText(filepath);while (sr.Peek() >= 0)myDDL.Items.Add(new ListItem(sr.ReadLine());sr.Close();Something like that ought to do the trick.Happy Programming!--Scott Mitchell mi******@4guysfromrolla.com http://www.4GuysFromRolla.com http://www.ASPFAQs.com http://www.ASPMessageboard.com* When you think ASP, think 4GuysFromRolla.com! 这篇关于将txt文件读取到DataSet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!