开发者

user name password length

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜