How does ASP differ from client-side scripting?

When using ASP, it is important to understand that Asp code exists on the server only. ASP code, which is code surrounded by the <% and %> delimiters, is processed completely on the server. The client accesses this ASP code. If you’ve created a web page before you might be familiar with client side scripting.

Client-Side scripting is programmatic code in an HTML file that runs on the browser.
Client-Side scripting code is simply HTML code and is denoted by the <script> HTML tag. Client-side scripting is commonly written using java script programming language due to the fact that Netscape navigator only supports the java script scripting language for client side scripting. Listing a static HTML Page that contain client side scripting code.

The Browser Receives only HTML

1: <HTML>
2: <Head>
3: <SCRIPT LANGUAGE=”JavaScript”>
4: <! …..>
5: alert(“Hello world”)
6: // .. >
7: </SCRIPT>
8: </HEAD>
9: <BODY>
10: welcome to my web page!
11: </BODY>
12: </html>


The code in listing includes raw HTML and it is nothing more than a static HTML file. If the contents of listing were entered into a web page named client side scripting.htm, the entire contents would be sent to the browser when the client requests the web page. The browser, when rendering the HTML, would display a message box when the alert method was reached in the output of listing and viewed through a browser. You can have client side scripting code in an ASP page because client side scripting is HTML code as far as the Web server is concerned .

New term

Server side scripts are scripts that execute on the web server. These scripts are processed and their output is sent to the client.

Method of Client-side scripting and Server–side Scripting

Client-side scripting : A client-side script is not processed at all by the web server, and it is processed only by the client. It is the client’s responsibility to execute all client side scripts.

Server – side scripting : Server – side scripting are processed completely on the web server. The client does not receive any code from server- side scripts: rather the client receives just the output of the server-side scripts. Client-side scripts and server side scripts cannot interact with one another because the client side scripts are executed on the client, after the server side scripts have finished processing completely.

It is most important to understand that client side scripts and server side scripts are two completely separate entities.

“Amazon and the Amazon logo are trademarks of, Inc. or its affiliates.”

| Privacy Policy for | Disclosure | Contact |

Copyright - © 2004 - 2024 - All Rights Reserved.