ASP.NET HTML 控件 RangeValidator 2
asp.net html 控件 rangevalidator 2
<script runat="server">
sub submit(sender as object, e as eventargs)
if page.isvalid then
lbl1.text="page is valid."
else
lbl1.text="page is not valid!!"
end if
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
enter a number from 1 to 100:
<asp:textbox id="tbox1" runat="server" />
<br><br>
<asp:button text="submit" onclick="submit" runat="server" />
<br><br>
<asp:label id="lbl1" runat="server" />
<br>
<asp:rangevalidator
controltovalidate="tbox1"
minimumvalue="1"
maximumvalue="100"
type="integer"
enableclientscript="false"
text="the value must be from 1 to 100!"
runat="server" />
</form>
</body>
</html>
sub submit(sender as object, e as eventargs)
if page.isvalid then
lbl1.text="page is valid."
else
lbl1.text="page is not valid!!"
end if
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
enter a number from 1 to 100:
<asp:textbox id="tbox1" runat="server" />
<br><br>
<asp:button text="submit" onclick="submit" runat="server" />
<br><br>
<asp:label id="lbl1" runat="server" />
<br>
<asp:rangevalidator
controltovalidate="tbox1"
minimumvalue="1"
maximumvalue="100"
type="integer"
enableclientscript="false"
text="the value must be from 1 to 100!"
runat="server" />
</form>
</body>
</html>
相关文章
- ASP.NET
- ASP.NET Web Pages 类参考手册
- ASP.NET MVC Web 应用程序
- ASP.NET MVC 参考手册
- ASP.NET 事件句柄
- ASP.NET HTML 服务器控件
- ASP.NET CompareValidator 控件
- ASP.NET Label 控件
- ASP.NET Style 控件
- ASP.NET TableRow 控件
- WebSecurity CurrentUserId 属性
- WebSecurity IsConfirmed 方法
- HTML InputImage
- HTML Table
- ASP.NET HTML 控件 Checkbox
- ASP.NET HTML 控件 DataList
- ASP.NET HTML 控件 Image
- ASP.NET HTML 控件 Radiobutton
- Textbox 3
- ASP.NET HTML 控件 CompareValidator 2