Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Checking IsValid in the web form

Reply
Thread Tools

Checking IsValid in the web form

 
 
R.A.
Guest
Posts: n/a
 
      05-12-2004
Hi

If I use the client side validation control, do I need to check for IsValid
on the server side? if yes then why?


Thanks


 
Reply With Quote
 
 
 
 
Nicole Calinoiu
Guest
Posts: n/a
 
      05-12-2004
Yes since you cannot be certain that client-side validation will be
executed. Some examples of when this might happen:

1. Client browser does not support the validation code.
2. Client browser has javascript disabled.
3. Post to the form comes from outside your application.

Any of these might be due to either "innocent" and valid client behaviour.
However, you should also be protecting yourself against malicious attempts
to hack your application, which can use any of the above mechanisms as well
in order to deliberately bypass client-side validation.

HTH,
Nicole


"R.A." <> wrote in message
news:...
> Hi
>
> If I use the client side validation control, do I need to check for
> IsValid
> on the server side? if yes then why?
>
>
> Thanks
>
>



 
Reply With Quote
 
 
 
 
Granger Godbold
Guest
Posts: n/a
 
      05-12-2004
Definitely.
#1: There's no guarantee the client-side stuff wasn't bypassed or otherwise didn't work. It's
pretty trivial to get around Javascript validation if you want to; I've done it a number of times
myself simply because the page's validation code was broken but I needed to use the form anyways.

R.A. wrote:

> Hi
>
> If I use the client side validation control, do I need to check for IsValid
> on the server side? if yes then why?
>
>
> Thanks
>
>


 
Reply With Quote
 
R.A.
Guest
Posts: n/a
 
      05-12-2004
Should I call Page.Validate before checking IsValid?


"Nicole Calinoiu" <> wrote in message
news:...
> Yes since you cannot be certain that client-side validation will be
> executed. Some examples of when this might happen:
>
> 1. Client browser does not support the validation code.
> 2. Client browser has javascript disabled.
> 3. Post to the form comes from outside your application.
>
> Any of these might be due to either "innocent" and valid client behaviour.
> However, you should also be protecting yourself against malicious

attempts
> to hack your application, which can use any of the above mechanisms as

well
> in order to deliberately bypass client-side validation.
>
> HTH,
> Nicole
>
>
> "R.A." <> wrote in message
> news:...
> > Hi
> >
> > If I use the client side validation control, do I need to check for
> > IsValid
> > on the server side? if yes then why?
> >
> >
> > Thanks
> >
> >

>
>



 
Reply With Quote
 
Nicole Calinoiu
Guest
Posts: n/a
 
      05-12-2004
Yes. The validators are not polled until you call the Validate method. The
requirement to call Validate before IsValid is mentioned in the
documentation for the IsValid property.


"R.A." <> wrote in message
news:...
> Should I call Page.Validate before checking IsValid?
>
>
> "Nicole Calinoiu" <> wrote in message
> news:...
>> Yes since you cannot be certain that client-side validation will be
>> executed. Some examples of when this might happen:
>>
>> 1. Client browser does not support the validation code.
>> 2. Client browser has javascript disabled.
>> 3. Post to the form comes from outside your application.
>>
>> Any of these might be due to either "innocent" and valid client
>> behaviour.
>> However, you should also be protecting yourself against malicious

> attempts
>> to hack your application, which can use any of the above mechanisms as

> well
>> in order to deliberately bypass client-side validation.
>>
>> HTH,
>> Nicole
>>
>>
>> "R.A." <> wrote in message
>> news:...
>> > Hi
>> >
>> > If I use the client side validation control, do I need to check for
>> > IsValid
>> > on the server side? if yes then why?
>> >
>> >
>> > Thanks
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking if the page IsValid in Javascript?! Emilio ASP .Net 6 02-18-2011 01:20 PM
IsValid <error: an exception of type: {System.Web.HttpException} occurred> info@record-play.com ASP .Net 0 06-29-2006 03:42 PM
Calling IsValid in a web control Simon Harvey ASP .Net 3 08-06-2004 01:47 PM
Calling IsValid in a web control Simon Harvey ASP .Net Web Controls 3 08-06-2004 01:47 PM
Calling IsValid in a web control Simon Harvey ASP .Net Building Controls 3 08-06-2004 01:47 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57