Form posting despite validation errors

G

Guest

On my dev machine it works as expected: if validation fails, message displays (in val message control) and button click is cancelled

In production; the button click is not cancelled when validation fails. The validation message displays as well as the resulting database error (which I display in a label on the page). So it appears the validtion controls are running but hte button event is not being cancelled

Dev and Prod environments are identical

Has anyone seen this behavior? TI
 
R

Rajiv R

Sam,

Are you checking the IsValid property of the Page object in the event
handler? if any validation failes, IsValid will be false.

--
Cheers!
Rajiv. R
Rajspace.Org

Sam Jackson said:
On my dev machine it works as expected: if validation fails, message
displays (in val message control) and button click is cancelled.
In production; the button click is not cancelled when validation fails.
The validation message displays as well as the resulting database error
(which I display in a label on the page). So it appears the validtion
controls are running but hte button event is not being cancelled.
 
G

Guest

Thanks, Rajiv

I can use that as a workaround I suppose, but I'd like to understand why the behavior is different between the two environments. I'd like to have the client-side validation prevent the form from posting as it does in my dev environment

Is there a setting whereby client validation runs but the form still is posted on failure?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top