ASP.NET Validation question

  • Thread starter Thread starter Iwan Petrow
  • Start date Start date
I

Iwan Petrow

Hi,

I have the following situation: I have to check values (TextBox.Text in
most cases). For example the text have to be 5 letters from A-Za-z. If
not a message have to be shown. Here I use RegularExpressionValidator.
But I want when the user press a given button the click event of the
button to be executed nevertheless RegularExpressionValidator. How
could I disable the validator? Would you tell me other ways of doing
these things?

Thanks.
 
Iwan said:
Hi,

I have the following situation: I have to check values (TextBox.Text in
most cases). For example the text have to be 5 letters from A-Za-z. If
not a message have to be shown. Here I use RegularExpressionValidator.
But I want when the user press a given button the click event of the
button to be executed nevertheless RegularExpressionValidator. How
could I disable the validator? Would you tell me other ways of doing
these things?

Thanks.

If you want to make button that should ignore all validation (lika a
"Cancel" button), set the "CausesValidation" property of that button to
"false".
 
Back
Top