In designer,
<asp:CompareValidator ID="cvReturnDate" runat="server"
ControlToValidate="txtReturnDate"
ErrorMessage="Return date must be valid date." Type="Date"
ValidationGroup="validateInquiry" >*</asp:CompareValidator>
In Code,
this.cvReturnDate.Operator = ValidationCompareOperator.GreaterThan;
this.cvReturnDate.ValueToCompare = DateTime.Now.ToShortDateString();
No comments:
Post a Comment