Click here to Skip to main content
12,550,379 members (45,999 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET
i did Google search i got the results like this

1. here in tag there is runat="Server" so these are server side controls
2. These are both Client and Server side

supose it is both(Client and Server)

Then some of people using JavaScript for validations why?

Can any one please clarify my doubt
Posted 25-Feb-13 2:24am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

ASP.Net validation controls are server side controls, meaning you can set values on them in C# code. However, the actual validation takes place on the client side.

Some people use JavaScript because it gives you more flexibility. It just all depends on what you want to do. There is no right or wrong way to do it.

However, even though you validate client side you should still always validate server side because client side can be manipulated by the user.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Validation controls are server side as you know we use runat = "server" but it's perform validation at client side.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.161021.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100