title: Add string of text to DropDownList in ASP.NET MVC
body: <p>In an ASP.NET MVC 3 Web site I have a view with the following code (Razor):</p>
  
  <pre><code>@Html.DropDownList("SessionYear", new SelectList(ViewBag.SessionYears as System.Collections.IEnumerable, "", "", Model.SessionYear), String.Empty)
  </code></pre>
  
  <p><code>ViewBag.SessionYears</code> is an <code>IEnumerable&lt;int&gt;</code>.</p>
  
  <p>The output is something like this:</p>
  
  <pre><code>&lt;select id="SessionYear" name="SessionYear"&gt;&lt;option value=""&gt;&lt;/option&gt;
      &lt;option&gt;2013&lt;/option&gt;
      &lt;option selected="selected"&gt;2012&lt;/option&gt;
      &lt;option&gt;2011&lt;/option&gt;
      &lt;option&gt;2010&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>That's great, however, what I'd like to do now is add a bit of text to the text displayed in the drop down list, so each option looks a little like this:</p>
  
  <pre><code>&lt;option&gt;2013-2014&lt;/option&gt;
  &lt;option selected="selected"&gt;2012-2013&lt;/option&gt;
  </code></pre>
  
  <p>I've tried playing around with the different options, but none are working, and I've exhausted the overloads.</p>
  
  <p>Can I do this with the DropDownList helper, or do I need to implement this in a different way?</p>
  
  <p>EDIT: And while I could probably convert SessionYears to an object that has an int and string to resolve this, I'd prefer not to. But if that's what I've got to do, that's what I'll do.</p>
  
  <p>EDIT 2:</p>
  
  <p>The code I'd expect to work is:</p>
  
  <pre><code>@Html.DropDownList("SessionYear", new SelectList(ViewBag.SessionYears as System.Collections.IEnumerable, "", (Model.SessionYear + "-" + (Model.SessionYear + 1)), Model.SessionYear), String.Empty)
  </code></pre>
  
  <p>However, I get the following error:</p>
  
  <pre><code>DataBinding: 'System.Int32' does not contain a property with the name '2012-2013'.
  </code></pre>
  
  <p>Which I suppose makes sense, since Model.SessionYear is an int. This is also why I'm thinking I have to create a new object that contains SessionYear as an int and then some other property that contains <code>(SessionYear + "-" + (SessionYear + 1))</code> (as I've done in the past with other models).</p>
  
  <p>But I would expect for there to be an easier way.</p>