title: Setting default selected value of selectlist inside an editor template
body: <p>I have this code to set the default value of my select list:</p>
  
  <pre><code>public ActionResult Register()
  {
      IList&lt;Country&gt; countryList = _countryRepository.GetAllCountry();
  
      var registerViewModel = new RegisterViewModel
      {
          CountryId = 52,
          CountryList = new SelectList(countryList, "CountryId", "CountryName", "Select Country")
      };
  
      return View(registerViewModel);
  }
  </code></pre>
  
  <p>I have this on my view and this works well sets the selected country value to 52:</p>
  
  <pre><code>&lt;%: Html.DropDownListFor(model =&gt; model.CountryId, Model.CountryList ,"Select Country") %&gt;
  </code></pre>
  
  <p>However when I create an editor template for this, the default value for country is not selected</p>
  
  <p>So, I change my current view to this:</p>
  
  <pre><code> &lt;%: Html.EditorFor(model =&gt; model.CountryId,new { countries = Model.CountryList}) %&gt;
  </code></pre>
  
  <p>Then I create my editor template like this:</p>
  
  <pre><code>&lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl&lt;System.Int64?&gt;" %&gt;
  &lt;%= Html.DropDownList(
          String.Empty /* */, 
          (SelectList)ViewData["countries"], 
          "Select Country"
      )
  %&gt;
  </code></pre>