i have an xml file and want to use it to populate a dropdownlist control in asp.net mvc application
xml looks like this
<?xml version="1.0" encoding="utf-8" ?>
<Processes>
<Process>
<id>1</id>
<ConfigFile>Process1.xml</ConfigFile>
</Process>
<Process>
<id>2</id>
<ConfigFile>SecondProcess.xml</ConfigFile>
</Process>
<Process>
<id>3</id>
<ConfigFile>Process3.xml</ConfigFile>
</Process>
</Processes>
this is what i have done so far: IT WORKS THANK YOU GUYS
IEnumerable<SelectListItem> process = from proc in
XDocument.Load("Processes.xml").Descendants("Process")
select new SelectListItem
{
Text = (string)proc.Element("ConfigFile")
};
ViewBag.process = process;
NOW I WANT TO DO SOMETHING ON DROPDOWNLIST ITEMSELECTED EVENT OPEN A NEW WEB PAGE WITH A TEXTBOX