title: DropDownList setting selected item in MVC5
body: <p>How can I set the default value for the DrowDownList?</p>
  
  <p>I have something like this:</p>
  
  <pre><code>@Html.DropDownListFor(model =&gt; model.BusinessID, (SelectList)ViewBag.Businesses, new { @class = "form-control" })
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>    // GET: Reviews/Create
      public ActionResult Create()
      {
          ViewBag.Businesses = new SelectList(db.Businesses, "BusinessID", "BusinessName");
          return View();
      }
  
      [HttpPost]
      [ValidateAntiForgeryToken]
      public ActionResult Create([Bind(Include = "ReviewID,ReviewText,Rating,BusinessID")] Review review, int id)
      {
          if (ModelState.IsValid)
          {
              db.Reviews.Add(review);
              db.SaveChanges();
              return RedirectToAction("Details", "Businesses", new { id = review.BusinessID });
          }
  
          review.BusinessID = id;
          ViewBag.Businesses = new SelectList(db.Businesses, "BusinessID", "BusinessName", review.BusinessID);
          return View(review);
      }
  </code></pre>
  
  <p>How I call it:</p>
  
  <pre><code>@Html.ActionLink("Write a review", "Create", "Reviews", new { id = Model.BusinessID }, null)
  </code></pre>
  
  <p>And the point is that each my BusinessID, has a value, and I call them let's say like this /Reviews/Create/15, so in this case BusinessID is 15. And when the page loads, I want the item with the BusinessID 15 to be selected by default. But whenever I load the page, it always selects the one with the lowest BusinessID.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Changing GET action to this solved the problem:</p>
  
  <pre><code>        public ActionResult Create(int? id)
          {
              ViewBag.Businesses = new SelectList(db.Businesses, "BusinessID", "BusinessName", id);
              return View();
          }
  </code></pre>