title: Difference between 'Html.Validate' and 'Html.ValidateFor'
body: <p>Why do we use <code>.Validate</code> and <code>.Validatefor</code> in validation?</p>
  <p>I am using that, but I am not getting any error message in the UI.</p>
  <h3>Code</h3>
  <pre><code>&lt;div&gt;
      @{Html.BeginForm();}
      @Html.TextBoxFor(x =&gt; x.LastName, new { id = &quot;txtLastName&quot; })
      @{Html.Validate(&quot;LastName&quot;);}
      @{Html.ValidateFor(x=&gt;x.LastName);}
      &lt;input type=&quot;submit&quot; id=&quot;btnSubmit&quot; value=&quot;Submit&quot; /&gt;
      @{Html.EndForm();}
  &lt;/div&gt;
  </code></pre>