title: ASP.Net Core2 Razor Selectlist
body: <p>It seems that there is ZERO documentation related to a select/dropdown list in ASP.NET Core2 with <strong>Razor Pages</strong>.</p>
  
  <p>I would like to create dropdown lists that select/display data from another table.</p>
  
  <p>I am suspecting that each 'view' (Index, Details, Create and Edit) will most likely need a different implementation? 
  For example:
  the Index and Details (which are View only) page, would need to read the value in the field, but then fetch that associated text from the reference table.</p>
  
  <p>There is a ton of info out there that relates to an MVC but Razor pages don't have a ViewBag.</p>
  
  <p>I have tried adding </p>
  
  <p>var school = _context.AdmSchool.ToList();
  SelectList selectList = new SelectList(school, "AdmSchoolId", "AdmSchoolName", null);
  school = selectList;</p>
  
  <p>in the create.cshtml.cs ('controller' for want of a Razor name) file</p>
  
  <p>and</p>
  
  <pre><code>@Html.DropDownList("school", null, null, htmlAttributes: new{@class="form-control", placeholder="Select School"});
  </code></pre>
  
  <p>into the Create.cshtml (view) file.</p>
  
  <p>So does anybody out there have experience with Razor pages?
  I must confess that I am an absolute newbie, so the more verbose your response, the more I am likely to understand it.
  Thanks</p>