P
Pete Baugh
Hi Folks,
I've got a simple aspx page with a few input controls on with required
fieldvalidators for each and a submit button. The validators work fine
when I click the button without having entered any of the fields.
However, after having added some code behind for the buttons _Click
event to save the data in the database, I have discovered that the
code will run anyway. So on a click, the validators fire up and
correctly display that the fields have not been filled but then the
code runs and saves the blank entry to the database.
Have I missed something somewhere?? I have an example of a similar
situation from some Wrox code, and I can't see any further check in
the code behind....
Any help gratefully received...
Many Thanks,
Pete Baugh
(e-mail address removed)
I've got a simple aspx page with a few input controls on with required
fieldvalidators for each and a submit button. The validators work fine
when I click the button without having entered any of the fields.
However, after having added some code behind for the buttons _Click
event to save the data in the database, I have discovered that the
code will run anyway. So on a click, the validators fire up and
correctly display that the fields have not been filled but then the
code runs and saves the blank entry to the database.
Have I missed something somewhere?? I have an example of a similar
situation from some Wrox code, and I can't see any further check in
the code behind....
Any help gratefully received...
Many Thanks,
Pete Baugh
(e-mail address removed)