Change textbox's css class when ASP.NET Validation fails

前端 未结 6 2108
遥遥无期
遥遥无期 2020-12-01 09:27

How can I execute some javascript when a Required Field Validator attached to a textbox fails client-side validation? What I am trying to do is change the css class of the

6条回答
  •  星月不相逢
    2020-12-01 10:17

    I think you would want to use a Custom Validator and then use the ClientValidationFunction... Unless it helpfully adds a css class upon fail.

提交回复
热议问题