  {
               @class = &quot;form-control&quot;,
               id = &quot;TaskStateCombobox&quot;
           })
    &lt;/span&gt;</strong>
&lt;/h2&gt;</pre>

<p>Then I changed <strong>IndexViewModel</strong> to add <strong> SelectedTaskState</strong> property and <strong>GetTasksStateSelectListItems</strong> method:</p>

<pre lang="cs">
public class IndexViewModel
{
    //...

    <strong>public TaskState? SelectedTaskState { get; set; }</strong>

<strong>    public List&lt;SelectListItem&gt; GetTasks