Comparing a Field to a Date Data Type using the CompareValidator Control (VB.net)
<%@ Page Language=VB Debug=true %>
<HTML>
<HEAD>
<TITLE>Comparing a Field to a Date Data Type using the CompareValidator Control</TITLE>
</HEAD>
<form runat="server">
<BR><BR>
Please enter a Date:<BR>
<asp:textbox
id="txtDate"
runat=server
/>
<asp:comparevalidator
id="cvCheckDate"
controltovalidate="txtDate"
operator="DataTypeCheck"
type="Date"
runat="server"
>
You must enter a date!
</asp:CompareValidator><BR><BR>
<asp:button
id="butOK"
text="OK"
type="Submit"
runat="server"
/>
</form>
</BODY>
</HTML>
Related examples in the same category