繁体   English   中英

在ASP.NET C#中比较旅程日期和返回日期

[英]Compare journey date with return date in asp.net c#

我必须比较旅程日期和返回日期。 返回日期应大于等于旅行日期。 应使用哪个验证器以及如何使用? 帮我。 ASP.NET C#。 谢谢。

您可以使用CustomValidator并在客户端或服务器端检查验证

<asp:CustomValidator ID="cvComment" runat="server" ClientValidationFunction="clientCheckDateTime"
    Enabled="true" Display="Dynamic" ControlToValidate="[Control ID]" Text="[Your Message]" />


<script language="javascript" type="text/javascript">
 function clientCheckDateTime(source, arguments) {        
    arguments.IsValid = [Check Validation];
 }
 </script>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM