Thanks for response. Let me give more details. The valid format should be either numbers such as 10, 20, 30 or a range consisting of one number, a hyphen (-) and a second number. For example, 1-2 is fine. 10-200 is OK. 1000-7367 is also OK. Help please!!!!!! The project is due!!!
我能跟你学英语吗?
Regular expression 我也不熟
@"^([1-9][0]{1,}-[1-9]{0,}|[1-9]-[0-9]{0,})$"
10-200 is ok
10000-345345 is ok
1-996 is ok
......
[email protected]
顺便给我份 谢谢
hychieftain(不同) . Thank you very much for the document in advance. Please send it to my email account: [email protected].
Thank the other guys very much for your help and time.
Huo ba zi
to mumuhope(hopehaha)
希望向你学习英语!! ^_^
http://www.regexlib.com/
<asp:TableCell Text="Duration (IEP)"></asp:TableCell>
<asp:TableCell BackColor="WhiteSmoke">
<asp:TextBox ID="tbMIDuration" Runat="server"></asp:TextBox>
<asp:DropDownList ID="dlMIDuration" Runat="Server"></asp:DropDownList>
<asp:RegularExpressionValidator ID="rvMIDuration" Runat="server" ErrorMessage="<BR>Invalid Duration value (example: 10 or 10-20)"
ControlToValidate="tbMIDuration" ValidationExpression=@"^([1-9]{0,}|[1-9][0]{1,}-[1-9]{1}[0-9]{0,}|[1-9]{0,}-[0-9]{0,})$" Display="Dynamic"></asp:RegularExpressionValidator>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="tbrMIDuration">
<asp:TableCell Text="Duration (IEP)"></asp:TableCell>
<asp:TableCell BackColor="WhiteSmoke">
<asp:TextBox ID="tbMIDuration" Runat="server" ></asp:TextBox>
<asp:DropDownList ID="dlMIDuration" Runat="Server"></asp:DropDownList>
<asp:RegularExpressionValidator ID="rvMIDuration" Runat="server" ErrorMessage="<BR>Invalid Duration value (example: 10 or 10-20)"
ControlToValidate="tbMIDuration" ValidationExpression="\d+(-\d+)?" Display="Dynamic"></asp:RegularExpressionValidator>
</asp:TableCell>