I am new to MVC and working on an MVC4 Application.
What I wan to do is I want to disable my Dropdown if it is empty.
View->
@Html.DropDownList("UserName", null, string.Empty)
Controller->
ViewBag.UserName = new SelectList(lstUserName, "username", "username");
UserName is my viewbag which contains the list of items to fill dropdown.
Now if lstUserName is empty,I want to disable the DropDown..How can I achieve that..