Validator controls, Page.IsValid, JavaScript disabled confusion

W

weboweb

Hello group,

I've been scouring documentation for when a user disables Javascript
and posts a webform with invalid data.
Here's my confusion:
The microsoft docs assure you that the server validator controls
ALWAYS perform validation server-side.
However, in many other places I've read that you ALWAYS must check
Page.IsValid property, usually at the click / command events that
cause the postbacks, before you run, let's say, some DB code to update
your database with potentially invalid data.

All nice and dandy, but from my tests when I disable Javascript at the
client simply by setting EnableClientScript property to false, the
page is posted back with invalid data, and the server DOES NOT let it
through (the validator controls fire up and show their error messages
when the page reloads)

Isn't that at odds with "you must ALWAYS check Page.IsValid to prevent
invalid data from making it through to your database?" as I've read in
many places (newsgroups, articles, etc)

Please anybody shed some light on this, I haven't been able to find a
definitive answer.

Again, from my tests, the validator controls do stop this from
happening.

Thanks a lot

webO
 

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,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top