Code :
Page.Validate();
if (!Page.IsValid)
{
Page.RegisterStartupScript("ko", "<script>alert('Failed');</script>");
return;
}
on this controls, some validator fails! How can I check which one? Thank you!
You can get a collection of validators and check which is not valid
foreach (var item in Validators)
{
if (!((IValidator)item).IsValid)
{
//do something
}
}