N
Nathan Sokalski
As we probably know, the MaxLength property of the TextBox control only
works when the TextMode property is SingleLine or Password. I want to limit
the number of characters a user can enter into a MultiLine TextBox to 250. I
figured the best way to do this would be with a RegularExpressionValidator.
For my ValidationExpression I figured I would use:
..{0,250}
However, the . does not include the \n character. On the page:
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_fxfund/html/c82dc689-7e82-4767-a18d-cd24ce5f05e9.htm
there were a bunch of RegexOption members, one of which (the singleline
member) looked like it could do what I wanted. However, I was having trouble
understanding how to specify what options I wanted. If anyone could help me
here, I would appreciate it. Thanks.
works when the TextMode property is SingleLine or Password. I want to limit
the number of characters a user can enter into a MultiLine TextBox to 250. I
figured the best way to do this would be with a RegularExpressionValidator.
For my ValidationExpression I figured I would use:
..{0,250}
However, the . does not include the \n character. On the page:
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_fxfund/html/c82dc689-7e82-4767-a18d-cd24ce5f05e9.htm
there were a bunch of RegexOption members, one of which (the singleline
member) looked like it could do what I wanted. However, I was having trouble
understanding how to specify what options I wanted. If anyone could help me
here, I would appreciate it. Thanks.