controller
IEnumerable<SelectListItem> process =
from proc in
XDocument.Load("Processes.xml").Descendants("Process")
select new SelectListItem
{
Text = (string)proc.Element("ConfigFile")
};
ViewBag.process = process;
view
<p>@Html.DropDownList("process")</p>
I want to handle an event on item selected in the dropdown list
I Googled a bit and people say there is no regular event handler like normal ASP or WinForm application
I’m not familiar with javascript and jquery but i could understand a code
You could put this DropDown inside a form and use javascript to subscribe to its
onchangeevent and manually submit this form:this will POST the selected value to the SomeAction where you could retrieve it: