Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to diable some validator controls 1

Status
Not open for further replies.

pankajv

Programmer
Jan 30, 2002
178
0
0
IN
Here is my requirement:

1. I have a text box (lets say txtStore), which accepts some integer values. This is a mandatory field. User can just enter an number and if he/she hits enter we need to retrieve some values and display it.

2. Screen also has some other fields, which are mandatory when user clicks on Save button.

I have used validator controls for all the mandatory fields, but I dont want to validate any information when user hits 'enter' inside the txtStore text box.

Any ideas/solutions will be of great help.

Thanks,
Pankaj
 
Set the CausesValidation property of the control to False to turn off validation entirely.

If you want to be selective, you can turn off validators by setting Validator.Visible to false in the code-behind, or by setting CausesValidation of everything to false, then checking Validator.IsValid in the code-behind for only the validators you wish to check.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top