Monday, March 26, 2012

Validation Control on Insert fires on Update Also

I have a Required field validation control that in located in a formview that works correct, however it also fires when I perform a update on a record in a gridview that is part of the same page. I only want the validation control to fire when someone uses the form to insert a record, not when a user tries to edit and update a record via the gridview.

thanks

OneIdesigned

RequiredFieldValidator1.Enabled = Not (RequiredFieldValidator1.Enabled)

put this in your button-click sub

No comments:

Post a Comment