Can't post the selected value dropdownlist
<p>I'm having some trouble posting the value that I have in a <code>BeginForm</code> to the controller I got this error: </p>

<blockquote>
  <p>"There is no ViewData item of type 'IEnumerable' that has the key 'TipoDespesa'."</p>
</blockquote>

<p>I'm kinda new in Asp.net Mvc and I don't know how to solve this. I did this:</p>

<p><strong>model:</strong></p>

<pre><code>@using (Html.BeginForm())
            {
                &lt;div class="form-group"&gt;
                    &lt;a href="@Url.Action("Create", "Despesas")" class="btn btn-danger" data-toggle="tooltip" title="Adiciona uma despesa" style="float: left;"&gt;
                        &lt;span class="glyphicon glyphicon-plus" aria-hidden="true"&gt;&lt;/span&gt;
                    &lt;/a&gt;
                &lt;/div&gt;
                &lt;div class="form-group col-md-offset-1"&gt;
                    &lt;label class="control-label"&gt;Tipo de despesa&lt;/label&gt;
                    @Html.DropDownList("TipoDespesa", (SelectList)ViewData["TipoDespesa"], "Todos", htmlAttributes: new { @class = "form-control" })
                &lt;/div&gt;
                    &lt;div class="form-group"style="padding-left:20px"&gt;
                        &lt;label class="control-label"&gt;Data&lt;/label&gt;
                        &lt;input type="date" class="form-control" name="pesquisa" /&gt;
                    &lt;/div&gt;
                    &lt;div class="form-group"&gt;
                        &lt;button type="submit" class="btn btn-default" data-toggle="tooltip" title="Pesquisar por data"&gt;&lt;span class="glyphicon glyphicon-search"&gt;&lt;/span&gt;&lt;/button&gt;
                    &lt;/div&gt;

            }
</code></pre>

<p><strong>Controller where i fill the dropdown:</strong></p>

<pre><code>public ActionResult Index()
    {
        var userId = User.Identity.GetUserId();
        var despesas = db.Despesas.Include(d =&gt; d.TipoDespesa).Include(d =&gt; d.TipoPagamento).Where(d =&gt; d.ApplicationUserId == userId);
        ViewBag.TipoDespesa = new SelectList(db.TipoDespesas, "TipoDespesaId", "TipoDespesaNome");

        return View(despesas.ToList());
    }
</code></pre>

<p><strong>Controller where i execute the query</strong></p>

<pre><code> public ActionResult Index(string pesquisa,string tipoDespesa)
    {
        var userId = User.Identity.GetUserId();
        var resultado = from r in db.Despesas.Include(r =&gt; r.TipoDespesa).Include(r =&gt; r.TipoPagamento).Where(r =&gt; r.ApplicationUserId == userId)
                        select r;

        if (!String.IsNullOrEmpty(pesquisa))
        {
            DateTime d = Convert.ToDateTime(pesquisa);
            resultado = resultado.Where(r =&gt; r.Data == d);
        }

        if(pesquisa != "Todos")
        {
            resultado.Where(r =&gt; r.TipoDespesa.TipoDespesaNome == pesquisa);
        }

        return View(resultado);
    }
</code></pre>