title: use Razor to fill dropdown with Linq2Sql data
body: <p>I'm experimenting with ASP.NET MVC3 and want to simply populate a dropdown list with data I get from a LINQ2SQL class, like so</p>
  <p>controller (I know, Linq doesn't belong in the controller)</p>
  <pre><code>var allUsers = (from u in _userDataContext.Users
                              select u).ToList();
              ViewBag.allUsers = allUsers.ToList();
              return View();
  </code></pre>
  <p>view:</p>
  <pre><code>&lt;select id=&quot;drop_heroes&quot;&gt;
          @foreach (var u in ViewBag.allUsers)
          { 
              &lt;option value=&quot;@u.pk_userid&quot;&gt;@u.email&lt;/option&gt;
          }
      &lt;/select&gt;
  
  That works fine, but I would like to use Razor @Html.Dropdownlist to create the same dropdown list, but can't find any info to make this work with Linq data. 
  </code></pre>