Prefix 0 in Razor Textbox value <p>Here is my Razor text box</p> <pre><code>@Html.TextBoxFor(model =&gt; model.ShortBufferHour,new { @maxlength = "2",Style="text-align:center;"}) </code></pre> <p>It shows the <code>Hours</code> as <code>7</code>. How to prefix a <code>0</code> in case of single digit hour. So that the textbox content be <code>07</code></p>