Posted on: 9/21/2014 12:35:54 PM | Views : 439

Hi all,
This is driving me crazy. My Validation happens when I click the submit button and the page is posted back. However, for the life of me I cannot get the validation to take place when the focus changes from an element. I want to be able to validate an element when the focus changes.

My current code fort the First Name text box and validation is -

<tr> <td style="width:auto"> <asp:Label ID="Label1" runat="server" Text="First Name"></asp:Label> </td> <td> <asp:TextBox ID="FirstName" runat="server" Width="220" CausesValidation="true" ></asp:TextBox> </td> </tr>

<asp:RequiredFieldValidator ID="NewEmployeeFirstNameValidator" runat="server" ErrorMessage="Please Enter a First Name!" ControlToValidate ...

Go to the complete details ...