Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在文本框上设置了一个自定义验证器。
它只验证文本框中是否有一些文本,当有人点击提交按钮时,我需要它一直触发。
我怎样才能做到这一点?
将您的设置CustomValidator.ValidateEmptyText为true.
CustomValidator.ValidateEmptyText
true
来自 MSDN:
[ValidateEmptyText] [g] 设置或设置一个布尔值,指示是否应验证空文本。