rangevalidator
代碼:
<!DOCTYPE html><html>
<body>
<form runat="server">
Enter a date between 2005-01-01 and 2005-12-31:
<br>
<asp:TextBox id="tbox1" runat="server" />
<br><br>
<asp:Button Text="Submit" runat="server" />
<br><br>
<asp:RangeValidator
ControlToValidate="tbox1"
MinimumValue="2005-01-01"
MaximumValue="2005-12-31"
Type="Date"
EnableClientScript="false"
Text="The date must be between 2005-01-01 and 2005-12-31!"
runat="server" />
</form>
</body>
</html>
結(jié)果:
相關(guān)文章
- ASP.NET MVC 模型
- ASP.NET CompareValidator 控件
- ASP.NET CustomValidator 控件
- WebSecurity UserExists 方法
- HTML Anchor
- HTML Image
- ASP.NET HTML 控件 Literal
- ASP.NET HTML 控件 Repeater
- ASP.NET HTML 控件 CompareValidator 2
- ASP.NET HTML 控件 RangeValidator 2
- C# 實(shí)例 實(shí)例解釋
- VB 實(shí)例 If 條件
- ASP.NET Calendar OtherMonthDayStyle 屬性
- ASP.NET HyperLink ImageUrl 屬性
- ASP.NET LinkButton Text 屬性
- ASP.NET BulletedList Target 屬性
- 設(shè)置字符集名稱
- 取得指定驅(qū)動器的文件系統(tǒng)信息
- 取得指定驅(qū)動器的根文件夾
- Content Linking 組件#