Set dropDownList to contain one value only, mvc3
- by ParPar
I have this in my controller:
ViewBag.PriceListId = new SelectList(m_db.PriceLists, "Id", "Name", us.PriceListId);
It contains two values now, but I want to enable the user to choose only the second value, and just if he does something else - allow him choose one of the both values.
How do I omit the first value, and add and set him to default after that?
Shoud I do it in my controller or use jquery?
Thank in advance.