title: Change CssClass of a textbox if validation failed in asp.net using  validators
body: <p>I want to change the CssClass to txtbox300CommentRED if validation in asp.net fails.</p>
  
  <p>I cant find a way to do is this. Is it possible that we can tell RequiredFieldValidator or other Validators to change the CssClass class of txtFullName if validation fails?</p>
  
  <pre><code>&lt;asp:TextBox ID="txtFullName" runat="server" CssClass="txtbox300Comment"&gt;&lt;/asp:TextBox&gt;
  &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator"&gt;&lt;/asp:RequiredFieldValidator&gt;
  </code></pre>
  
  <p>How can I achieve this and what is hassle free or professional way to do it.</p>
  
  <p>Help is appreciated. </p>