是否有可能将服务器标签与 RegularExpressionValidator 一起使用,例如
<asp:RegularExpressionValidator runat="server" ValidationExpression="<%# Common_.getValidationExpression(); %>" ControlToValidate="txtPhone" ErrorMessage="Please enter alphanumeric values" />
实际上,我想在单个类中管理所有正则表达式,并且我还想在 ASPX 页面上使用服务器标签,而不是在代码隐藏中:)
谢谢。