GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET 2.0
Go To First  |  Previous Question  |  Next Question 
 ASP.NET 2.0  |  Question 3 of 161    Print  
Should validation (did the user enter a real date) occur server-side or client-side? Why?

  
Total Answers and Comments: 13 Last Update: August 17, 2009   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
August 08, 2005 03:40:02   #1  
Jatinder Singh Rana        

RE: Should validation (did the user enter a real date) occur server-side or client-side? Why?
if we are using .net validation controls then validation is always done at server on client browser it depends
1. on type of browser if browser version is less then 4.0 then it is not done
2. if client have switched off javascript execution on it's browser on it's own through property /settings
3. in coadding page attribute ClientTarget Downlevel is defined then also validation is done only on the server

 
Is this answer useful? Yes | No
August 20, 2005 02:05:36   #2  
Hemapriya        

RE: Should validation (did the user enter a real date) occur server-side or client-side? Why?
validation should be done in client side itself to avoid the round trip to the server
 
Is this answer useful? Yes | No
September 23, 2005 03:04:02   #3  
sandhya        

RE: Should validation (did the user enter a real date)...

Its not that validation has to be done only on the client side depending on the situation it varies if it is not required to fetch data from the database and validate client side validation can be done.

server side validation is done whenever it is required since it utilizes the server side resources


 
Is this answer useful? Yes | No
October 07, 2005 03:53:57   #4  
Sudhakar Leo        

RE: Should validation (did the user enter a real date)...
It Depends on your project if you want to do simple calculations than go ofor client side validations like javascript and if the data you are validating is confident and precious than go for server side validating
 
Is this answer useful? Yes | No
February 23, 2006 20:41:35   #5  
Prakash Nayak        

RE: Should validation (did the user enter a real date)...
Validation should always occur at server side only as the data which is null values cannot be checked properly through client side.
 
Is this answer useful? Yes | No
April 16, 2007 03:16:28   #6  
mukesh        

RE: Should validation (did the user enter a real date)...
It is a good practice to validate all the fields (i.e. information) at client side to make less server roundtrip.
 
Is this answer useful? Yes | No
May 26, 2008 05:41:54   #7  
hiteshc Member Since: May 2008   Contribution: 2    

RE: Should validation (did the user enter a real date) occur server-side or client-side? Why?
Well it acn be done from both sides(AServer as well as Client). From Server side you can use Regular Validation Expression for date in different formats where same thing can be done from Client side by using javascript(JS). So both of them can be use
 
Is this answer useful? Yes | No
July 07, 2008 00:49:57   #8  
ynvpavan Member Since: September 2007   Contribution: 16    

RE: Should validation (did the user enter a real date) occur server-side or client-side? Why?
If you use the asp.net validation controls then the validation is performed both on the client side as well as server side.

So to have a better performance it's best to maintain ponly client side validation to check the date validation. And it's better to use client side script i.e javascript. So that the validation can be performed only on client side and can avoid to have validation controls so that they have a validation check on server side also .

 
Is this answer useful? Yes | No
September 09, 2008 12:36:28   #9  
vivek_upadhyay_2812 Member Since: September 2008   Contribution: 4    

RE: Should validation (did the user enter a real date) occur server-side or client-side? Why?
It's upon you what you prefer that can be done on both sides best practice says it should be done on both side just to be on the safer side becuse there is some possibility that client side validation can be hacked(disabled) by some vulnerable scripts
so to be on safer side do it on server side as well as client side.

 
Is this answer useful? Yes | No
June 01, 2009 09:22:54   #10  
albu77 Member Since: September 2007   Contribution: 9    

RE: Should validation (did the user enter a real date) occur server-side or client-side? Why?
I would say that validation has two aspect:
User interface
Application validation (business rules)and security

To get a smooth not flickering page and fast answer validation: client side
That is the comfort side.

To really validate for the application(business rules and security): server side.
That is the business side;

The second one could not been avoided and hopefully can't be inhibited by the user (in the case n 1 if javascript is killed no validation)

 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape