ASP.NET 中的验证控件在服务器端和客户端都有效吗?还是仅用于客户端验证?
谢谢
最佳答案
ASP.NET 验证控件同时执行 client side
和 server side
验证。 EnableClientValidation
是 disable
的属性(property)客户端验证。
引自 ASP.NET Validation Controls 的 MSDN 文档
Validation controls perform input checking in server code. When the user submits a page to the server, the validation controls are invoked to check the user input, control by control. Validation occurs after page initialization (that is, after view state and postback data have been processed) but before any change or click event handlers are called.
ASP.NET performs validation on the server even if the validation controls have already performed it on the client, so that you can test for validity within your server-based event handlers.
You can invoke validation in your own code by calling a validation control's Validate method
关于asp.net - ASP.NET 服务器端或客户端的验证控件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24596891/