你好,
你讲的是Unobtrusive Validation吗?
所谓Unobtrusive Validation,就是一种隐式的验证方式,将验证代码和HTML分离,在4.5以上的webform中可以使用。
你想知道如何在APPSETTING里面启用的话,可以参照如下代码:
<appSettings>
<!--启用Unobtrusive Validation,默认开启-->
<add key="ValidationSettings:UnobtrusiveValidationMode" value="WebForm"/>
<!--关闭Unobtrusive Validation-->
<!--<add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>-->
</appSettings>
具体的你可以参照这个
链接里面的第四点介绍。
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.