62,040
社区成员
发帖
与我相关
我的任务
分享
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Show Data Type Check</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label
id = "lblBirthDate"
text = "Birth Date"
AssociatedControlID = "txtBirthDate" //注释????
runat = "server"
/>
<asp:TextBox
id = "txtBirthDate"
runat = "server"
/>
<asp:CompareValidator
id = "cmpBirthDate"
text = "(Invalid Date)"
ControlToValidate = "txtBirthDate"
type = "Date"
Operator = "DataTypeCheck"
runat = "server"
/>
<br /><br />
<asp:Button
id = "btnSubmit"
text = "Submit"
runat = "server"
/>
</div>
</form>
</body>
</html>
<!--
<asp:Label
id = "lblBirthDate"
text = "Birth Date"
AssociatedControlID = "txtBirthDate" //注释????
runat = "server"
/>
<asp:TextBox
id = "txtBirthDate"
runat = "server"
/>
<asp:CompareValidator
id = "cmpBirthDate"
text = "(Invalid Date)"
ControlToValidate = "txtBirthDate"
type = "Date"
Operator = "DataTypeCheck"
runat = "server"
/>
<br /><br />
<asp:Button
id = "btnSubmit"
text = "Submit"
runat = "server"
/>
-->