Posted on: 4/11/2014 6:49:05 AM | Views : 358

hi
@{ List<SelectListItem> lstItems = new List<SelectListItem>(); lstItems.Add(new SelectListItem
{ Text = "10", Value = "10", //Selected=true });
lstItems.Add(new SelectListItem {
Text = "20", Value = "20"
}); lstItems.Add(new SelectListItem {
Text = "50", Value = "50"
}); }
@Html.DropDownList("ddl", lstItems, new { onchange ="location.href='/employee?pageSize=' + this.value;" ,SelectListItem="this.value;"})

above is my dropdownlist i call index action in it.
but when i select 20 than its working good but dropdownselectedValue is being 10 so how to solve it
action is called perfactly value passed in action is right but when view display dropdownselected 10 always


Go to the complete details ...