This has not happened to me before, but for some reason server side validation events are not being triggered: I'm using Code below
<asp:CustomValidator runat="server" id="RefId" OnServerValidate="Ref_Id" ControlToValidate="txtRefId" ErrorMessage="Referral ID is Required." ></asp:CustomValidator>
When I fix the debugger on below code that time the code will not be triggered. plz check below code also.
Protected Sub Ref_Id(ByVal source As System.Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs)
    Dim isPresent As String
    isPresent = MembershipManager.IsReferalApproved(Me.txtRefId.Text)
    If isPresent <> "" Then
        addReferralName()
        args.IsValid = True
    Else
        lblRefNotValid.Text = "Referral IDNO does not exist."
        lblRefNotValid.Visible = True
        Me.txtRefName.Text = ""
        args.IsValid = 开发者_如何学编程False
    End If
End Sub
your custom validator's control should have the property ValidateEmptyText = True or the validation won't trigger on an empty textbox
Does your txtRefId Autopostback and CausesValidation?
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论