2012-09-04 3 views

답변

0

ValidationExpression="^[[email protected]]{0,25}$"을 사용하십시오. 그것은 또한 .@ 기호를 허용합니다. 알파 숫자에 대한 그들을

<asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox1" ValidationExpression="^[[email protected]]{0,25}$" ErrorMessage="Only Alphanumeric"></asp:RegularExpressionValidator> 
2

정규식을 제거 할 경우
"^[a-zA-Z0-9]*$"
당신이 빈 문자열, 사용 + 대신 *의를 원하지 않는 경우.

1

다음과 같이 충분해야합니다. 여기

^[0-9A-Za-z]*$ 

^ indicates start of the string 
0-9 all number from 0 to 9 
A-Z all Upper case character 
a-z all small case character 
* indicates 0 or more character 
$ end of string 
아래 휴식입니다
관련 문제