G
Guest
I have a textBox Where I type date. I want to validate it. Im using
customValidate controls. I have this function in my code behind page
void DatesValidate(object source, ServerValidateEventArgs e)
{
if (Convert.ToDateTime(e.Value) <= DateTime.Now)
{
e.IsValid = false;
this.lblAddUsers.Text = "The Proxy is already expired";
}
}
<asp:CustomValidator ID="cvEndDate" runat="server"
OnServerValidate="DatesValidate"
ControlToValidate="txtTo" ErrorMessage="error"
Display="Dynamic"></asp:CustomValidator>
It is not working it is giving the follo2ing error
'Proxy.DatesValidate(object,
System.Web.UI.WebControls.ServerValidateEventArgs)' is inaccessible due to
its protection level
customValidate controls. I have this function in my code behind page
void DatesValidate(object source, ServerValidateEventArgs e)
{
if (Convert.ToDateTime(e.Value) <= DateTime.Now)
{
e.IsValid = false;
this.lblAddUsers.Text = "The Proxy is already expired";
}
}
<asp:CustomValidator ID="cvEndDate" runat="server"
OnServerValidate="DatesValidate"
ControlToValidate="txtTo" ErrorMessage="error"
Display="Dynamic"></asp:CustomValidator>
It is not working it is giving the follo2ing error
'Proxy.DatesValidate(object,
System.Web.UI.WebControls.ServerValidateEventArgs)' is inaccessible due to
its protection level