Guys I have a question here. I write a custom validation and then my validation summary doesnt show up. Any suggestion..

I just use onservervalidation,without client validation. is that possible to show up the message?

protected  void ServerValidation(object source, ServerValidateEventArgs args)
        {
           
                if (args.Value.ToString().Equals("Select"))
                {
                    args.IsValid = false;
                }
                else
                {
                    args.IsValid = true;
                }
          
        }
<asp:CustomValidator ID="CustomValidator1" 
        runat="server" 
        ErrorMessage="Please Select One " 
        OnServerValidate="ServerValidation"
        ValidateEmptyText="True" 
        ControlToValidate="Purpose" 
        ForeColor="Red" EnableClientScript="False" Display="None" 
            ValidationGroup="vgSetUp">*</asp:CustomValidator>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red"
            HeaderText="Submission failed: Please insert the following fields:" 
            ValidationGroup="vgSetUp" />

Advise is needed.

Problem solved...It just show up after 2nd time validation...wonder can show all in 1 time validation summary?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.