explanation of excerpt from article

G

Guest

hey all,

i was reading this article on validation controls and came across this
paragraph:

Server Side Validation

ASP.NET will always execute validation checks on the server when a button
click event arrives requiring validation. You can disable any of the
validation controls by setting the Enabled property to false.

What does the first sentence mean?

thanks,
rodchar
 
S

Steve C. Orr [MVP, MCSD]

When you use validation controls, the data is checked to be valid as soon as
the request arrives at the server.
(BTW, it's also checked for validity on the client when possible.)
 
G

Guest

so when you say "the data is checked to be valid" does that mean the data is
assumed to be valid?

I mean where would I put my validation code on the server?
 
B

bruce barker

actually is not checked until you reference Page.IsValid

-- bruce (sqlwork.com)


| When you use validation controls, the data is checked to be valid as soon
as
| the request arrives at the server.
| (BTW, it's also checked for validity on the client when possible.)
|
| --
| I hope this helps,
| Steve C. Orr, MCSD, MVP
| http://Steve.Orr.net
|
|
| | > hey all,
| >
| > i was reading this article on validation controls and came across this
| > paragraph:
| >
| > Server Side Validation
| >
| > ASP.NET will always execute validation checks on the server when a
button
| > click event arrives requiring validation. You can disable any of the
| > validation controls by setting the Enabled property to false.
| >
| > What does the first sentence mean?
| >
| > thanks,
| > rodchar
|
|
 
S

Steve C. Orr [MVP, MCSD]

If you're using the validation controls, this is all handled automatically
for you, so you wouldn't really have any validation code.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
 
S

Steve C. Orr [MVP, MCSD]

No, you don't need to explicitly reference anything when using validation
controls. It's done automatically.
Maybe there's a reference like that in the auto-generated code section or
something, but that's mostly irrelevant.
 
W

William F. Robertson, Jr.

All validation controls are checked when Page.Validate is called. This is
usually called before any postback events are processed, but you can
manually set it off by calling Page.Validate.

Bruce,

For your records, IsValid checks to ensure Page.Validate() was called, then
steps through the validators collection. It checks each validator; when it
finds a false, it returns immediately. Otherwise, true is assumed and
returned.

bill
 
G

Guest

i apologize if i'm being unclear (very new to this) so please allow me to
restate purpose of question:

How do I perform what is considered server-side validation?


I've read that it's a good idea to perform both client-side and server-side
validation. I understand the validation control takes care of the client-side
but do the validation controls have anything to do with server-side
validation?

thanks,
rodchar
 
G

Guest

please disregard my last post, after reviewing replies again i think my
question was answered. i'll look at them a few more times. thanks, this
helped.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top