How to properly send SelectedValue of DropDownList from View to controller? ViewModel
<p>I've tried many solutuons, for example <a href="https://stackoverflow.com/questions/27901175/how-to-get-dropdownlist-selectedvalue-in-controller-in-mvc4">this</a>, <a href="https://stackoverflow.com/questions/21075263/pass-selected-dropdown-list-value-from-view-to-controller">this</a> and <a href="http://forums.asp.net/t/1817429.aspx?How%20to%20get%20selected%20value%20of%20dropdown%20from%20view%20to%20action" rel="nofollow noreferrer">this</a>. However, it does not work cause other examples use <code>ViewBag</code>, but I am using <code>ViewModel</code>.</p>
<p>I have <code>ScheduleViewModel</code>:</p>
<pre><code>public class ScheduleViewModel
{
    public int[] SelectedValues { get; set; }
    public IEnumerable&lt;SelectListItem&gt; Values { get; set; }       
    public Schedule OneSchedule { get; set; }
}
</code></pre>
<p>Controller action <code>List</code>:</p>
<pre><code>    public ActionResult List(ScheduleViewModel scheduleVM)//scheduleVM is always NULL
    {                             
        var model = new ScheduleViewModel();
        IList&lt;SelectListItem&gt; listTime = new List&lt;SelectListItem&gt;();
        DateTime time = DateTime.Today;            
        for (DateTime _time = time; _time &lt; time.AddDays(5); _time = _time.AddDays(1)) //from 16h to 18h hours
        {
            listTime.Add(new SelectListItem() { Value = _time.ToShortDateString(), Text = _time.ToShortDateString() });
        }
        
        model.Values = listTime;
        return View(model);
    }
</code></pre>
<p>and View:</p>
<pre><code>model CinemaAppl.WebUI.Models.ScheduleViewModel


@using (Html.BeginForm())
{
    &lt;p&gt;       
        @Html.DropDownListFor(m =&gt; m.SelectedValues, Model.Values)
        &lt;input type=&quot;submit&quot; value=&quot;Filter&quot; /&gt;
    &lt;/p&gt;
}
</code></pre>
<p><strong>How to properly send SelectedValue of DropDownList from View to controller by Button click?</strong> Is it possible to send values without <code>AJAX</code> and creating <code>POST</code> method? If it is not possible, it is okay to use <code>AJAX</code> or <code>POST</code> approaches.</p>
<p><strong>What I want is:</strong></p>
<p>I want <code>DropDownListFor</code> where I can choose just one <code>DateTime</code> value which I can send to <code>ActionResult List()</code>.</p>
<p>I can see all <code>DateTime</code> values:</p>
<p><a href="https://i.stack.imgur.com/xf66e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xf66e.png" alt="enter image description here" /></a></p>