XmlDocument xml = new XmlDocument();
// xml.LoadXml(@"c:\abc.xml"); // suppose that myXmlString contains "..."
xml.Load(@"c:\abc.xml");
XmlNodeList xnList = xml.SelectNodes("/NewDataSet/Table");
foreach (XmlNode xn in xnList)
{
string firstName = xn["Sno"].InnerText;
string lastName = xn["CustomerName"].InnerText;
DropDownList1.Items.Add(lastName);
DropDownList1.Items[0].Value = firstName;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment