它看起来像标准的asp 2 RangeValidator控件不允许倍。例如01/01/2008 12时00未在我的范围接受,即使它应该是有效的。如果我删除它按预期工作的时间。
It looks like the standard asp 2 RangeValidator control doesn't allow times. e.g. 01/01/2008 12:00 is not accepted in my range, even though it should be valid. If I remove the time it works as expected.
有一个验证器,在那里,允许日期/时间格式?
Is there a validator out there that allows for date/time format?
我们没有AJAX扩展。理想情况下,想了preexisting控制或常规的前pression用的CustomValidator使用。验证应该是客户端,服务器验证部分很简单。
We don't have Ajax extensions. Ideally, would like a preexisting control or a regular expression to use with CustomValidator. Validation should be client side, the server validation part is easy.
我们用这个正则表达式:
We used this RegExp:
regexlib/REDetails.aspx?regexp_id=610
推荐答案您可以使用自定义验证并手动进行检查。
You could use a custom validator and perform the check manually.
下面是一个简单的例子或你可以谷歌asp定制验证器。如果排除的ControlToValidate属性,那么你可以验证对多个字段。
Here's a quick example or you can Google "asp custom validator". If you exclude the "ControlToValidate" property then you can validate against multiple fields.
更多推荐
日期/时间范围验证器ASP.Net
发布评论