title: change associated textbox color using Required Field Validator
body: <p>I'm using required field validator to validate textbox. </p>
  
  <pre><code>    &lt;tr&gt;
         &lt;td&gt;
             &lt;asp:Label ID="lbllogin" runat="server" Text="Registration ID"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
         &lt;td&gt;
             &lt;asp:TextBox ID="txtloginid" runat="server" AutoPostBack="true" 
                  ontextchanged="txtloginid_TextChanged" TabIndex="1" 
                  ToolTip="Enter Registration Id" Width="150px"&gt;&lt;/asp:TextBox&gt;
         &lt;/td&gt;
         &lt;td&gt;
             &lt;asp:RequiredFieldValidator ID="reqloginid" runat="server" 
                  ControlToValidate="txtloginid" Display="Dynamic" ErrorMessage="*" 
                  ToolTip="Enter Registration Id" ValidationGroup="User_login" 
                  ForeColor="#CC3300" SetFocusOnError="True"&gt;&lt;/asp:RequiredFieldValidator&gt;
         &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>Now i want to add color to textbox , how can i do it with required filed validator. i'm using updatepanel. thanks in advance</p>