I’m making an asp.net page with asp.net validation controls. If validation fails, I want to show a div (on the client). Where do I do this? I can’t find a way to access the OnValidate event on the client. I can do this on the server, but I’d rather do it on the client.
I’m making an asp.net page with asp.net validation controls. If validation fails, I want
Share
Use an ASP.NET custom validator.
If for some reason you can’t/don’t want to do that, use a ClientScriptManager.RegisterOnSubmitStatement method, and ensure to return false in the client-side script if whatever you’re validating fails.