Q. Why it doesn't work ?

Arch4ngel

Well-known member
Joined
Mar 22, 2004
Messages
940
Location
Montreal, QC
I have 3 buttons on a page and 1 TextBox.
2 Validator are attached to the textbox (a RegularExpression and a RequiredField). I also have ValidationSummary.

The 3 buttons have CausesValidation to False except for the one called "Add".

When I press the ADD button it doesnt validate correctly.
The required field doesnt work as well as the RegularExpression.

My regular expression is @"\d*".

I thought it should work... but I did wrong ? :-\

N.B.: Tell me if you want code, screenshot or anything else.
 
I found that when a validators property Visible is set to false, the validation doesnt occure.

Does someone have seen the same problem ?
 
nothing special.

ControlToValidate = txtVitesse (a simple textbox placed in a DIV) - same for RequiredField
RegularExpression = \d*

Why when I turn Visible to false ... it dont validate anymore ?
 
IIRC if the control isnt visible then it wont render to HTML. If it isnt in the HTML then it wont validate.. Why would you want an invisible validator control anyway?
 
Because I have a ValidationSummary. I would have tought that it will only be invisible but that hell be rendered.

Solution : change the fore color to the background color (not the better solution anyway... )

Any proposal of a better solution will be accepted. :D
 
Back
Top