SyntaxFix
Write A Post
Hire A Developer
Questions
You can use below method, which is quite simple.
new SelectList(items, "ID", "Name",items.Select(x=> x.Id).FirstOrDefault());
This will auto-select the first item in your list. You can modify the above query by adding a where clause.