title: Could not pass Dropdownlist Selected Value to Action Method
body: <p>I have used a ModelView for static Dropdownlist values and tried to call print method from Razor in MVC4. However, I cannot pass the selected Dropdownlist value to teh Action method while I could pass the other parameters in input field. Could you please tell me where I made mistake? </p>
  
  <p><br/></p>
  
  <p><strong>ApplicantViewModel:</strong></p>
  
  <pre><code>public class ApplicantViewModel
  {
      public IEnumerable&lt;Applicant&gt; Applicants { get; set; }
  
      //Codes for Dropdownlist values
      public string SelectedValue { get; set; }
      public IEnumerable&lt;SelectListItem&gt; Values
      {
          get
          {
              return new[]
              {
                  new SelectListItem { Value = "pdf", Text = "Pdf" },
                  new SelectListItem { Value = "excel", Text = "Excel" },
                  new SelectListItem { Value = "word", Text = "Word" }
              };
          }
      }
  }
  </code></pre>
  
  <p><br/></p>
  
  <p><strong>ApplicantController:</strong></p>
  
  <pre><code>public ViewResult Reporting()
  {
      var model = new ApplicantViewModel(); 
      return View(model);
  }
  
  public ActionResult RenderReport(string type, string name, string fileName, string dataSource, string table, string filter)
  {
      //Codes for rendering report
      ...
  }
  </code></pre>
  
  <p><br/>
  <strong>Reporting.cshtml:</strong></p>
  
  <pre><code>@model MyProject.Models.ApplicantViewModel
  
  @using (Html.BeginForm())
  { 
   &lt;div&gt;
      @Html.DropDownListFor(model =&gt; model.SelectedValue, Model.Values, "-- select an option --", new { type=Model.SelectedValue, name = "type", id = "type"})
  
      &lt;input type="button" title="Render Report" value="P" onclick="'location.href=@Url.Action("RenderReport", "Applicant", 
      new { " 
       //type="pdf", //if I assign type value at here no problem. But I want the value to be assined by Dropdownlist
       type=Model.SelectedValue, //It pass SelectedValue = null to the Controller
       name="Report1",            
       fileName="Applicant list",
       dataSource="ApplicantDataset",
       table="ApplicantsView",
       filter="David"id = item.ID }) "/&gt;    
  &lt;/div&gt;
      }    
  }
  </code></pre>