Bug? - RegularExpressionValidator on a MultiLine TextBox

G

Guest

Hello everyone

I have a MultiLine TextBox, as follows

<asp:TextBo
Id="StreetAddress
Rows="4
Runat="Server
TextMode="MultiLine
Width="100%"/

To which I assign the following RegularExpressionValidator

<asp:RequiredFieldValidato
ControlToValidate="StreetAddress
Display="Dynamic
ErrorMessage="You must enter your street address
Id="StreetAddressReqVal
Text="*
Runat="Server"/

The problem is thar, when I enter a multiline text on that TextBox, when I finish editing (hitting TAB or clicking outside the TextBox), Internet Explorer hangs up..

And I'm sure that the problems is the TextMode="MultiLine" property, since when I remove it, everything works perfectly

Can anyone help me? Is this an ASP.NET bug? How can I override it

Thanx.
 
M

Martin Dechev

Hi, Enzo Marinelli,

Did you test the code on different computers? And which version of the
framework you are working with? Most probably it's your browser that has
some problems (or your windows even).

And it's not a RegularExpressionValidator in your example - it's a
RequiredFieldValidator.

Greetings
Martin
Enzo Marinelli said:
Hello everyone,

I have a MultiLine TextBox, as follows:

<asp:TextBox
Id="StreetAddress"
Rows="4"
Runat="Server"
TextMode="MultiLine"
Width="100%"/>

To which I assign the following RegularExpressionValidator:

<asp:RequiredFieldValidator
ControlToValidate="StreetAddress"
Display="Dynamic"
ErrorMessage="You must enter your street address"
Id="StreetAddressReqVal"
Text="*"
Runat="Server"/>

The problem is thar, when I enter a multiline text on that TextBox, when I
finish editing (hitting TAB or clicking outside the TextBox), Internet
Explorer hangs up...
And I'm sure that the problems is the TextMode="MultiLine" property, since
when I remove it, everything works perfectly.
 
M

Martin Dechev

And the regular expression is?

Greetings
Martin
Enzo Marinelli said:
Martin, thanks for your reply...

You are right, I copy & pasted the wrond validator...

The RequiredFieldValidator does work, but the RegularExpressionValidator
does crash Internet Explorer, at least on my machine...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top