title: I want to force uppercase on Html.LabelFor in MVC razor?
body: <p>I am using MVC Razor as my View engine. I want to force uppercase on <code>Html.LabelFor</code> I tried the following techniques but not working for me!!</p>
  
  <p>Please help me some one!</p>
  
  <pre><code>@Html.LabelFor(model =&gt; model.YearID.ToString ().ToUpper())
  </code></pre>
  
  <p>Above code giving below error:
  <strong>Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.</strong></p>
  
  <pre><code> @Html.LabelFor(model =&gt; model.YearID).ToString().ToUpper()
  </code></pre>
  
  <p>Above code working but out put showing along with html code like this: </p>
  
  <p><code>&lt;LABEL FOR="STUDENTENROLLPLANS_SCHOOLYEARID"&gt;</code>WHICH SCHOOL YEAR ARE YOUR ENROLLING FOR?<code>&lt;/LABEL&gt;</code></p>