when to use client side / server side?


Hey,
Please can someone tell me when do i need to use a client-side or a server-side?
For instance, I have a dropdownlist and when the user choses one of the listitems then click on the button to submit changes,i need first to validate the new value chosen by the user by comparing it with the old value and then redirect the user to the next page if there are no errors or view an error on the other hand! so in this case what's more preferable to use a JScript (client side) or on the click event of the button pressed (server side)!
waiting the reply.................
thanx in advance
Hiba
0
Hiba84
11/30/2006 10:58:38 AM
📁 asp.net.client-side
📃 24353 articles.
⭐ 2 followers.

💬 1 Replies
👁️‍🗨️ 1613 Views



well..for your scenario you can use both, doing it with the javascript(or with the validator controls) on the client  will  save you a  server trip  and  also  enhance  user  experience but  the  user may choose  to  disable  javascript  on  his browser  and in that  case your valildation fails  and you may end up  saving  wrong data in database. So the best approach is to use both--client and server validation.
Hope this clarifies. 

Home Is Where the Wind Blows
http://pushpontech.blogspot.com
0
pushp_aspnet
11/30/2006 11:39:53 AM
Reply: