title: MVC sort list before showing it in view by name
body: <p>I am trying to sort my list in alphabetical order before viewing all the details on my page.</p>
  
  <p>This is my code to get a clearer image of what I'm trying to say:</p>
  
  <pre><code>&lt;div id= "teamMain" style="margin-left: 45px";&gt;
    &lt;% foreach (var item in Model.getTeams) { %&gt;
      &lt;a href="Statistics?id=&lt;%: encrypted %&gt;" class="teamImage"&gt;
          &lt;img src="../../&lt;%: item.image %&gt;" alt="&lt;%: item.name %&gt;" /&gt;
      &lt;/a&gt;
    &lt;% } %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I need to sort my list in alphabetical order before showing it.</p>
  
  <p>Thanks.</p>