《从XML文件中读取数据绑定到DropDownList》文章已经归档,站长之家不再展示相关内容,下文是站长之家的自动化写作机器人,通过算法提取的文章重点内容。这只AI还很年轻,欢迎联系我们帮它成长:
1 、绑定DropDownList: 以下为引用的内容:ddl_language.DataSource = createDataSource(); ddl_language.DataTextField = "languageTextField"; ddl_language.DataValueField = "languageValueField"; ddl_language.DataBind(); 2、上面用到的createDataSource()方法: 以下为引用的内容: private ICollection createDataSource() { //create a data table to store the data for the ddl_langauge control DataTable dt = new DataTable(); //define the columns of the table dt.Columns.Add("languageTextField",typeof(string)); dt.Columns.Add("languageValueField",typeof(string)); //read the content of the xml file into a DataSet DataSet lanDS = new DataSet(); string filePath = ConfigurationSettings.AppSettings["LanguageXmlFil...
......
本文由站长之家用户“dev.csdn.net”投稿,本平台仅提供信息索引服务。由于内容发布时间超过平台更新维护时间,为了保证文章信息的及时性,内容观点的准确性,平台将不提供完整的内容展现,本页面内容仅为平台搜索索引使用。需阅读完整内容的用户,请联系作者获取原文。
(举报)