What is the difference between client side code & Server side code?

Posted by Theramkumar under ASP.NET on 12/10/2009 | Views : 10125 | Status : [Member] | Replies : 3
Hi, All...
Most of the time, I am confusing about this one...What is the difference between client side code & Server side code?...Normally while we are learning course what type of code will use?. Can any one give brief explaination about what is the funtion of these two type of codes?... Pls explain briefly...

T.RAM KUMAR


Responses

Posted by: Srinu0411 on: 12/10/2009 [Member] Starter

Up
0
Down
the code you r writing in html page is called clint side code i.e(java script etc) which will execute in browser itself,will not goto server.

the code you r writing in default.cs page is called server side code
which willgo to server and get the information.

kaja srinivas

Theramkumar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Chikul on: 12/11/2009 [Member] Bronze

Up
0
Down
Hi Theramkumar,

Server Side Code :
It is written in the .CS file for C# and .vb file for VB.Net
Server side code will always run on server side and create round trip on server in the response of request for any aspx page.
These will consume the servers memory.
server side code validate data to check whether sent data is correct or not.

Client Side Code :
It is a scripting language (JavaScriptpt or vb script) that can be included in the HTML Page or can contain in the Source File either .vb or .cs .
It runs on client's browser it does not create any round trip to the server.
e.g validation of controls dynamically hiding and displaying some of controls or there values etc.
The reason why we do client side validations is to save the to and from time taken for the request to go to the server and the response to get back to the browser.
Client side code validate the data before sending it to server.

Regards,
Chikul

Theramkumar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 12/11/2009 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
In one word... Everything that comes to the client is Client Side, and Everything that runs while creating the Response is Server Side.

Javascript is client side code which directly sent to the browser, and you can see it using View-Source of the browser. On the other hand, .NET languages are in the server side, resides in the server and you cant find them using view - source of the browser.

www.abhisheksur.com

Theramkumar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response