Vishal Bhatia
Vishal Bhatia

Reputation: 31

Page.IsValid property

I am little bit confused of using Page.IsValid property, which lets us posting of data to the server if the form is valid.

As most of us uses ASP.Net Validators to validate data, which wont let the page to submit to the server until the information is valid, then in which condition the use of Page.IsValid property would be valid? please help me.

Upvotes: 1

Views: 1220

Answers (2)

ashish.chotalia
ashish.chotalia

Reputation: 3746

With JavaScript turned off, what may not be known is that, on the server side, even though the validators fire, it is left to the developer on how to use that information.

You may think you have built a secure application but a hacker could disable JavaScript and bypass all your validators! This is where the Page.Validate method and more importantly, the Page.IsValid property come in.

Moer info @ http://weblogs.asp.net/rajbk/archive/2007/03/15/page-isvalid-and-validate.aspx

Upvotes: 4

Jonathan Wood
Jonathan Wood

Reputation: 67223

There are a number of ways around the client-side validators. In the extreme case, the user could simply download the page and modify it in any way they want. There's no way to control that.

In most cases, the client-side validation controls will work just fine. But you should always verify data is valid on the server just in case.

Upvotes: 0

Related Questions