HTML Online Tutorial Contents

Following are the posts for HTML online Tutorial. To learn everything about HTML, just read these posts: HTML Online Tutorial HTML TAGS (2) HTML BASICS (3) HTML ELEMENTS (4) HTML ATTRIBUTES (5) More »

XHTML

XHTML stands for Extensible Hypertext Markup Language. It is also known as XML (Extensible Markup Language). It is a markup language. In XHTML, there are no predefined tags. The user defines the More »

HTML SUMMARY

In this tutorial, you learned: HTML Introduction HTML Tags HTML Basics HTML Elements HTML Attributes HTML Paragraphs HTML Headings HTML Formats HTML Image HTML Links HTML Lists HTML Frames HTML Table After More »

HTML TABLES (13)

HTML Tables are used to arrange data in web pages. HTML allows the use of tables by <table>…</table> tags. Each row in HTML table is recognized by <tr>…</tr> tag. In each row More »

HTML FRAMES (12.2)

Nested frames example: For the following example to work, there are two other simple HTML files : “HMTL11e1 frame a.html” and “HMTL11e1 frame b.html”. your browser will divide your screeub half. The More »

 

Tag Archives: display text examples in ASP

6 asp

Learn about Basic ASP Syntax Rules (6 ASP):

This basic tutorial will include examples of ASP code, which will make learning ASP easy for you. To Practice either copy them or try to create similar codes on your own and then run them.

How to write an output to the Internet Browser:

Just like a HTML file, ASP file can contain HTML tags in it. The ASP file can also contain some Server Scripts in it which are enclosed in <% and %> known as delimiters.


These Server Scripts are included to be executed on the Server. They can contain expressions, procedures, statement and phrases which are valid for scripting languages you prefer to use.

Write Command:

The write command (response.write) is specifically used for writing an output to a browser. Following is an example which sends the “My first text” to the browser.

Example:

<html>

<body>

<% response.write(“My first text”)%>

</body>

</html>

There is another shorthand way to do this. This shorthand way is shown in following example:

Example:

<html>

<body>

<% =“My first text”%>

</body>

</html>

 

Using Scripts in ASP

VBScript:

Several Scripting Languages can also be used in ASP. But the default scripting language is VBScript. Following is an example which sends the “My first text” to the browser using VBScript:

Example:

<html>

<body>

<%

response.write(“My first text”)

%>

</body>

</html>

 

JAVA Script:

As JAVA Script is not the default scripting language, so you need to set it as a default at the top of a particular page in the language specification. Another important advice is: JavaScript is case sensitive, so write your ASP code with uppercase. You should only use lowercase when it is required by the language. Following is an example which sends the “My first text” to the browser using JAVA Script:

Example:

<%@ language=”JavaScript”%>

<html>

<body>

<%

response.write(“My first text”)

%>

</body>

</html>

 

Moreover the ASP is usually used with JavaScript and VBScript. But if your requirement is to use other scripting languages like PERL and REXX. Then you need to install their script engines separately.

 

For more visit next posts in this category.To go back to Contents of this tutorial: ASP Active Server Side Scripting Contents