我有我的一個包含數據的XML文件。我想在該xml文件中的2個字段中填充組合框中的下拉選項 - FirstName和LastName。C#Windows窗體組合框下拉目錄
在我使用GUID的唯一ID格式的XML文檔,所以組合框的下拉需要的名字姓氏+每一個獨特的GUID的變量。
我有什麼到目前爲止是這樣的:
XmlDocument xmlReturnDoc = new XmlDocument();
xmlReturnDoc.Load("Data.xml");
XmlNodeList firstname = xmlReturnDoc.GetElementsByTagName("FirstName");
XmlNodeList lastname = xmlReturnDoc.GetElementsByTagName("LastName");
StudentSelectStudentComboBox.Items.Add(firstname + lastname);
這不工作...任何幫助將不勝感激。
OK,所以這是行不通的。哪一點?錯誤消息將有所幫助。 – BIDeveloper 2009-10-30 11:53:17