<div class="form-group">
@Html.LabelFor(model => model.CourseStatus, new { @class ="control-label col-md-2" })
<divclass="col-md-10">
@Html.DropDownList("statusList", String.Empty, new { @disbled= disabled})
@Html.ValidationMessageFor(model => model.CourseStatus)
</div>
</div>
I am new in ASP.NET MVC and RAZOR. I just want to create a disabled dropdownlist. I have already created SelectList name "statusList". Through which I am trying to call the status. but I want to make it disbled and make one status as by default
Pravesh Singh
27-Nov-2014You need to use like this.For an Empty drop down list with out any value you should use.
and if you want to populate values as well you can use like this.