            .Select(state =&gt;
                    new SelectListItem
                    {
                        Text = localizationManager.GetString(SimpleTaskAppConsts.LocalizationSourceName, $&quot;TaskState_{state}&quot;),
                        Value = state.ToString(),
                        Selected = state == SelectedTaskState
                    })
        );

        return list;
    }</strong>
}</pre>

<p>We should set <strong>SelectedTaskState</strong> in the controller:</p>

<pre lang="cs