Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Which is called Client Side and Server Side code.Can you give me a example.
Posted
Comments
Sergey Alexandrovich Kryukov 25-Jul-12 3:06am    
Sorry, this is not a good question. Just read some elementary introduction on Web, HTTP and ASP.NET.
--SA

Client-Side
Client-side scripting enables interaction within a webpage.
The code required to process user-input is downloaded and compiled by the browser or plug-in. An example of a client-side interaction is a rollover (typically triggered when choosing a navigation option).
Client-side scripting languages include JavaScript.

Server-Side
With server-side scripting, completing an activity involves sending information to another computer (server) across the internet.
The server then runs a program that process the information and returns the results, typically a webpage.
Search engines use server-side processing. When a keyword is sent, a program on a server matches the word or phrase entered against an index of website content. (To complete the same search as a client-side process would require the browser to download the entire search engine program and index.)
Server-side scripting languages include ASP and PHP.

client-side interaction
  • response to interaction may be more immediate (once the program code has been downloaded)
  • services are secure (as no information is sent from the browser)
  • reliant on the user having using a specific browser and/or plug-in on their computer
  • affected by the processing speed of the user’s computer

server-side interaction
  • complex processes are often more efficient (as the program and the associated resources are not downloaded to the browser)
  • there are security considerations when sending sensitive information
  • does not rely on the user having specific browser or plug-in
  • affected by the processing speed of the host server


Refer more:
Server Side Verses Client Side[^]
Client-Side vs. Server-Side Rendering[^]
 
Share this answer
 
Hi,
Client Side: This is code/routines that are not processed at all by the server. Code is written in scripts (javascript usually) - plain text commands that instruct the client to do something. Generally used for performing dynamic effects, such as image rollovers, or displaying message boxes, or even validation of data entered into a form (i.e. email address is in the format of an email address ... contains the @ symbol).

Server Side: This is code/routines executed only on the server. Code can be written in scripts as well (vbscript usually), but in the case of ASP.Net this is the compiled lanuages like C# / VB.Net. Used for processing content and returning data.

i.e.
You call up a webpage and a message box appears saying Welcome to "my site". This is client side. It did not require any request from the server to have that message box appear. That code was run on your computer/browser. But the page you requested displays a list of movies playing in your town. That list was populated/retrieved through a call to the Database (located at the City movie repository...or whatever) i.e. the server to retrieve that data for your town.


For more information refer the links below:
http://en.wikipedia.org/wiki/Client-side_scripting[^]
http://en.wikipedia.org/wiki/Server-side_scripting[^]



--Amit
 
Share this answer
 
Answering this question directly would not help you much. It's much better for you to read about the very basics in wider scope. Start here:

http://en.wikipedia.org/wiki/World_Wide_Web[^],
http://en.wikipedia.org/wiki/HTTP[^],
http://en.wikipedia.org/wiki/ASP.NET[^],
http://www.asp.net/get-started[^].

See also:
http://en.wikipedia.org/wiki/Server-side[^],
http://en.wikipedia.org/wiki/Server-side_scripting[^],
http://en.wikipedia.org/wiki/Client-side[^].

—SA
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900