开发者

Page.IsValid property

开发者 https://www.devze.com 2023-02-03 08:20 出处:网络
I am little bit confused of using Page.IsValid property, which lets us posting of data to the server if the form is valid.

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 val开发者_如何学运维id? please help me.


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消