I am using ListBoxFor where the user can select multiple values ,A user wants that he should get one value always selected for ex:

ListBox contains:
Id   Category
1    A
2    B
3    C
4    D
5    General

here General category should always be selected and user should not be able to change this selected value from ListBox.

@Html.ListBoxFor(model => model.SelectedCategory, ViewBag.ListCategories as MultiSelectList, new { })

I am using Asp.Net MVC 5

Related posts

Recent Viewed