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.