I want to postback and pass in a parameter onchange. I have
@Html.DropDownList("CategoryID", (System.Collections.Generic.IEnumerable<System.Web.Mvc.SelectListItem>)@Model.PhaseNames, new { @onchange = "location.href='/Home/Index?phaseFilter=this.value;'" })
This nearly works. this.value is not replaced with the selected option value as I would expect. Also, is there a better way to create the URL in this case?
This should work: