Posted on: 9/4/2013 4:31:36 PM | Views : 814

Hi All, Below code is not working if my Mandatory text Box is Y I need to enter a claim iD Please suggest 
<td class="Input" align="left"> Claim id </td> <td class="Input" align="left"> <asp:TextBox runat="server" ID="Txt_Claim_Id" CssClass="Input" MaxLength="13"></asp:TextBox> <asp:CustomValidator runat="server" ID="cusCustom_Claim_Mandatory" ControlToValidate="Txt_Claim_Id" OnServerValidate="Check_Claim_Mandatory" ErrorMessage="****" /> </td> Protected Sub Check_Claim_Mandatory(sender As Object, e As ServerValidateEventArgs) Handles cusCustom_Claim_Mandatory.ServerValidate If Txt_Claim_Id_Mandatory.Text = "Y" Then If Trim(Len(e.Value)) = 0 Then e.IsValid = False Else e.IsValid = True End If ...

Go to the complete details ...