Skip to content
Advertisement

Tag: asp.net-mvc-4

MVC DropDownList onchange event with value

I’m pretty new to MVC and i’m trying to determine the value of a DropDownList when the value is changed. At the moment the val variable being passed to my javascript function is always ‘undefined’. I’ve googled for the solution and everywhere says to do exactly what i’m doing right now. What am i doing wrong? cshtml: And my javascript:

Advertisement