Disable ASP.NET validators with JavaScript

后端 未结 6 1246
小鲜肉
小鲜肉 2020-12-05 04:23

Does anyone know how to disable an ASP.NET validator using JavaScript? I\'m using javascript style.display = \'none\' to disable parts of a web page. However these disabled

6条回答
  •  孤街浪徒
    2020-12-05 05:10

    Additionally, rather than simply hiding elements you could set the Visible property to false...

    whateverItem.Visible = false;

    This makes that item simply not render to the page, which I believe disables the validation. Someone please correct me if I am wrong.

提交回复
热议问题