0

I want to customize the default value of my dropdownlist, Like having a value of "Select an item" instead of the value exist from the Database.

View

 @Html.EditorFor(m => m.Vendor)

Model

 [UIHint("SellerDropDown")]
    public MDL.Vendor Vendor{ get; set; } 
4

1 回答 1

0

尝试这样的事情:

@Html.DropDownListFor(m => m.Vendor, mySelectList, "Select an item");
于 2013-04-05T10:58:53.390 回答