Validation Conrols: Client Side or Server Side?

Hi Folks,

I am just wondering if the validation controls, use javascript...or server side code behind...
Clearly, I would prefer it be server-side, because i'm concerned that a potential evil-doer could by-pass the validation, by turning off JS.
If the validation controls use JS --- can someone refer me to proper server side validation techniques (VB).

Thanks,

- Joel

 

 


"The truth is rarely pure and never simple."
- Oscar Wilde, The Importance of Being Earnest
0
langjoel
7/1/2008 7:02:44 AM
asp.net.web-forms 93655 articles. 6 followers. Follow

9 Replies
1101 Views

Similar Articles

[PageSpeed] 37
Get it on Google Play
Get it on Apple App Store

ASP.NET validation controls always use server-side validation, with additional client-side validation as an option (EnableClientScript). And you are right in that you should never rely on client-side validation only, as JS might be broke or disabled.

So the validation controls in ASP.NET can be safely used in your project.


If this post was useful to you, please mark it as answer. Thank you!
0
johram
7/1/2008 8:17:40 AM

Hi,

Check out the URL's for validations:

http://aspalliance.com/699

http://www.devhood.com/Tutorials/tutorial_details.aspx?tutorial_id=46

http://www.exforsys.com/tutorials/vb.net-2005/vb.net-validation.html

http://www.vb-helper.com/howto_net_use_validation.html

http://www.codeproject.com/KB/vb/pwd.aspx


Regards,
Ahmed

***************************************************
Please don't forget to mark the post as Answer, which helps you.

Thank you.
www.ahmadtasnim.com
0
tasnim5
7/1/2008 9:05:53 AM

i belive... the logical client side validations should be done on client side.. and business logic validations should happen on server side...

and by turning off your JS.. you will achieve nothing.. as today web is completly JS driven.. Examples

Ajax

tree control

Accordion

drag drop and list is bigger then a epic...  but it depends how we are developing our application.. there are many JS driven websites abd they are threat safe....

So again Client validations on client side server validations on server side


"Mark as answered if you feel this helps you"
"Curiosity is Bliss"
Regards,

Ravi Kant Srivastava
(Sr. Software Engineer)
Connexxions Business
Mumbai
INDIA
0
blurearc
7/1/2008 9:26:32 AM

blurearc:

So again Client validations on client side server validations on server side

I have yet to see a system where client validations are performed on the server - and vice versa Cool


If this post was useful to you, please mark it as answer. Thank you!
0
johram
7/1/2008 10:15:09 AM

The ASP.NET validation controls can do both - client side as well as server side validation. They first see if the browser is capable (uplevel browser) and injects the corresponding javascript code to handle the validation at the client side. Otherwise (downlevel browser) it's server side validation. 

0
santa_1975
7/1/2008 10:28:49 AM

Hi there,

All user input data validation should occur on the server and minimally on the client-side, though it is a good way to reduce server load and network traffic because we can ensure that only data of the appropriate type is submitted from the form. It is totally insecure. The user can view the code used for validation and create a workaround for it. Secondly, the URL of the page that handles the data is freely visible in the original form page. This will allow unscrupulous users to send data from their own forms to your application. Client-side validation can sometimes be performed where deemed appropriate and feasible to provide a richer, more responsive experience for the user.
Kalyan Krishna.B
(Web Developer)

Email: kalyandotnetdeveloper@gmail.com
0
kalyan1982
7/1/2008 11:05:02 AM

 Client side validation should only be to enhance the user's experiance of the page. Server-side validation can and should be rigoursly unit-tested. Wherever there is a security implication to the sending of bad data then the validation needs to be server-side.

I am about to publish some Filer functions as part of the CommonData project on CodePlex. http://www.codeplex.com/CommonData

Currently I am working on C# version, a VB.NET version will follow later.


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
7/1/2008 11:17:23 AM

Hi,

Thank you all for your reply, so just to clarify. the validation controls do use server side code...with the option to use client side code.
Will they ever choose ot use client side over server side code, if it detects a capable browswer?

Thanks,
- Joel


"The truth is rarely pure and never simple."
- Oscar Wilde, The Importance of Being Earnest
0
langjoel
7/1/2008 2:20:33 PM

You can bypass the server valdiation only if you really want, but then it is a deviation [from the original behavior] that *you* have to make in your code. There's no way that the browser can disable/"triumph" the server validation depending on its [the browser] capabilities.


If this post was useful to you, please mark it as answer. Thank you!
0
johram
7/1/2008 2:43:58 PM
Reply:

Web resources about - Validation Conrols: Client Side or Server Side? - asp.net.web-forms

Cross-validation (statistics) - Wikipedia, the free encyclopedia
is a model validation technique for assessing how the results of a statistical analysis will generalize to an independent data set. It is mainly ...

Serena Williams eyes history, Caroline Wozniacki craves validation in women's US Open final
As Serena Williams eyes another slice of tennis history, Caroline Wozniacki is craving validation with a watershed US Open final triumph on Sunday ...

Travers Duncan asks High Court to strike down ICAC validation laws
ICAC could be sent back to the High Court as a challenge to new laws validating corruption findings looms.

Adam Scott proclaims Texas win as validation of No.1 ranking
... No.1 golfer, beating American Jason Dufner in the third hole of a play-off at the Colonial event. "It's a good feeling and maybe some validation ...

Hollande to sign gay marriage bill after Constitutional Council's validation
Hollande to sign gay marriage bill after Constitutional Council's validation People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, ...

Marketers, Get Ready for the 'Validation Era'
The public brands included has been engaging in a "friends" arms race. But there are signs that we know we overdid it.

Validation and Uncertainty
What an extraordinary conversation I had recently on Twitter. It started with Neil Killick’s statement that we should not consider our stories ...

Nvidia Icera 410 LTE Modem Passes AT&T Network Validation
... Today's news is a small step and logical precursor toward both goals, Nvidia's Icera 410 LTE and HSPA+ baseband has passed AT&T's network validation ...

Ting’s Q1 Subscriber Growth Suffers from Sprint’s New Unlocking Validation Process
Back in February, Sprint updated the process it uses to validate unlocked devices that customers want to utilize on other carriers or one of ...

[Android M Feature Spotlight] Stricter APK Validation Now Actually Checks If All Of An APK's Files Are ...
While you might file this one under "really? We weren't doing this already?" if you're a security expert, Google has added stricter validation ...

Resources last updated: 12/29/2015 8:14:35 PM