'CustomValidator don't see OnServerValidate function
I created CustomValidator, but it don't see function BookingTypeS4AProjects_Validate when I debug it.
ClassA.ascx
<asp:DropDownList
ID="ddlProjects"
runat="server"
Width="450"
DataSourceID="odsProjects"
DataTextField="ProjName"
DataValueField="ProjNumber"
ValidationGroup="CoReqLine"
AutoPostBack="true" />
<asp:CustomValidator
ID="cvProjects"
runat="server"
ControlToValidate="ddlProjects"
ErrorMessage="some text"
Text="some text"
OnServerValidate="Projects_Validate"
ValidateEmptyText="True">
</asp:CustomValidator>
ClassA.ascx.cs
Program don't come to this function
protected void Projects_Validate(object source, ServerValidateEventArgs args)
{
args.IsValid = false;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
