Validation Controls Postback

  • Thread starter Rafael Veronezi
  • Start date
R

Rafael Veronezi

I have a little problem while working with Validation Controls in extensive
forms... When the user reaches the end, and something is wrong, it just
highlights the messages (a client-side script)... But, if the field is on
the top of the form, and the user doesn't search, and keep clicking on the
button, he will think that there's a problem on the form...
I would like to know how could I implement a way that the click button does
a postback, and then, if the IsValid variable is wrong, the correct messages
are show....
Thanks,
Rafa
 
C

Cowboy \(Gregory A. Beamer\)

Turn off the client side validation for each control and check IsValid() in
your CodeBehind. You can use a ValidationSummary control to get all of the
problems and pass it back to the client as a list of problems.

NOTE: .NET always does a server side check, even if you never use it, with
every validation. As clever hackers get around client side validation, it is
always a good thing to check IsValid() every time, even if you have client
side validation turned on.
 

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
474,079
Messages
2,570,573
Members
47,205
Latest member
ElwoodDurh

Latest Threads

Top