title: Is there a way to avoid me repeating my code in MVC Razor view?
body: <p>I need to do something like this:</p>
  
  <pre><code>&lt;div class="editor-field"&gt;
     @Html.EditorFor(model =&gt; model.A1)
     @Html.ValidationMessageFor(model =&gt; model.A1)
  &lt;/div&gt;
  &lt;div class="editor-field"&gt;
     @Html.EditorFor(model =&gt; model.A2)
     @Html.ValidationMessageFor(model =&gt; model.A2)
  &lt;/div&gt;
  &lt;div class="editor-field"&gt;
     @Html.EditorFor(model =&gt; model.A3)
     @Html.ValidationMessageFor(model =&gt; model.A3)
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm using MVC3 and the razor view engine which is new to me. What I would like to do is to avoid having to repeat the same block of four lines with A1,A2,A3,A4 ... A20. Is there some way I can use a helper, template or some other feature to make it so I don't have to repeat many lines of code. </p>