黄色电影一区二区,韩国少妇自慰A片免费看,精品人妻少妇一级毛片免费蜜桃AV按摩师 ,超碰 香蕉

customvalidator

代碼:

<script  runat="server">

Sub user(source As object,args As ServerValidateEventArgs)

   if len(args.Value)<8 or len(args.Value)>16 then

    args.IsValid=false

   else

    args.IsValid=true

   end if

End Sub

</script>    

 

<!DOCTYPE html>

<html>

<body>

 

<form runat="server">

<asp:Label runat="server" Text="Enter a username: " />

<asp:TextBox id="txt1" runat="server" />

<asp:Button Text="Submit" runat="server"/>

<br>

<asp:Label id="mess" runat="server"/>

<br>

<asp:CustomValidator

ControlToValidate="txt1"

OnServerValidate="user"

Text="A username must be between 8 and 16 characters!"

runat="server"/>

</form>

 

</body>

</html>

結(jié)果:

相關(guān)文章