开发者

user name password length

开发者 https://www.devze.com 2023-01-29 01:50 出处:网络
I have a text box for users to add their password and I want to preve开发者_Go百科nt the user from adding one character in the text box ,How Can I do this?use a validater something like:

I have a text box for users to add their password and I want to preve开发者_Go百科nt the user from adding one character in the text box ,How Can I do this?


use a validater something like:

<asp:RangeValidator
ControlToValidate="tbox1"
MinimumValue="1"
MaximumValue="100"
Type="Integer"
EnableClientScript="false"
Text="The value must be from 1 to 100!"
runat="server" />

or

<asp:RegularExpressionValidator 
ID="regexTextBox1" 
ControlToValidate="YourTextBoxID"   
runat="server"
ValidationExpression="^[\s\S]{1,200}$"
Text="200 characters max" />
0

精彩评论

暂无评论...
验证码 换一张
取 消