title: How to bind dropdownlist in partial view in mvc 4 using model?
body: <p>Hi i am using partial view in index.cshtml page. and partial view contains one dropdownlist which is bind dynamically from database.</p>
  
  <p>I don't want to use viewbag or viewdata for binding this dropdownlist.</p>
  
  <p>In Controller</p>
  
  <pre><code>    // GET: Reporting/Home
      public ActionResult Index()
      {
          var view = View();
  
          return view;
      }
  
      public ActionResult _ReportingMenu()
      {
          var DashboardList = GetAllDashboards();
  
          return View(DashboardList);
      }
  
  
      public IEnumerable&lt;DashboardDefinition&gt; GetAllDashboards()
      {
          return _reortDefinitionService.GetAllDashboards();
      } 
  </code></pre>
  
  <p>In index.cshtml</p>
  
  <pre><code>@model IEnumerable&lt;Portal.Domain.ReportingModule.ReportDefinition.DashboardDefinition&gt;
  
  @{
      ViewBag.Title = "Reporting";
      Layout = "~/Views/Shared/_Layout.cshtml";
  }
  
  &lt;h2&gt;Reporting View&lt;/h2&gt;
  @Html.ActionLink("Add new Chart", "Create", "Chart", new { area = "Reporting" }, null)
  
  @Html.Partial("_ReportingMenu")
  </code></pre>
  
  <p>In Partialview</p>
  
  <pre><code>    @model  Portal.Domain.ReportingModule.ReportDefinition.DashboardDefinition
  
      &lt;div class="nav navbar navbar-default navbar-no-margin submenu"&gt;
  
          @Html.DropDownList("Mobiledropdown1",IEnumerable&lt;Model.DashboardName&gt;)   
  
          &lt;a id="SubMenuIntegratorNew" class="btn btn-default submenu-item" href="#"&gt;
              &lt;i class="fa fa-file-o fa-lg"&gt;&lt;/i&gt;
              &lt;span class="submenu-item-text"&gt;New&lt;/span&gt;
          &lt;/a&gt;
          &lt;a id="SubMenuIntegratorSave" class="btn btn-default submenu-item" href="#"&gt;
              &lt;i class="fa fa-floppy-o fa-lg"&gt;&lt;/i&gt;
              &lt;span class="submenu-item-text"&gt;Save&lt;/span&gt;
          &lt;/a&gt;
          &lt;a id="SubMenuIntegratorSaveAs" class="btn btn-default submenu-item" href="#"&gt;
              &lt;i class="fa fa-files-o  fa-lg"&gt;&lt;/i&gt;
              &lt;span class="submenu-item-text"&gt;Save As&lt;/span&gt;
          &lt;/a&gt;
          &lt;a id="SubMenuIntegratorAddChart" class="btn btn-default submenu-item" href="#"&gt;
              &lt;i class="fa fa-picture-o fa-lg"&gt;&lt;/i&gt;
              &lt;span class="submenu-item-text"&gt;Add Chart&lt;/span&gt;
          &lt;/a&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>but i get an error of null model.</p>
  
  <p>I don't know how to implement in partial view</p>