Set a default value in DropDownListFor

0

In the form I have one:

@f.FormGroup().DropDownListFor(r => r.AtividadeId, Model.AtividadeList).WidthLg(6)  

Listing all activities to perform an activity filter.

I want to put an option: "List All" to list all activities without the filter. How do I put this option and leave it as default?

In my model I put:

[Display(Name = "Atividade")]
[Required(ErrorMessage = "Campo obrigatório")]
public String AtividadeId { get; set; }
public SelectList AtividadeList { get; set; }

public IList<RelAtividadeVM> Atividade { get; set; }
    
asked by anonymous 20.09.2017 / 21:47

0 answers