ASP at a glance

by Shabbir on April 10, 2009

in ASP.Net

ASP contains text, HTML tags and different scripts. These scripts in an ASP file are executed on the server.Before learning ASP one should have knowledge of VBscript or Java script.ASP means Active Server Pages and this pages runs on Internet Information Services .ASP file is the same as HTML file it contains HTML, XML, and scripts and these scripts are executed on server.ASP files are saved with extension.asp.

Features of ASP

1.It edits, changes and add different contents to a Web page.
2.It replies to user queries and to data whish submitted from HTML forms.
3.Access any data or databases and return the results to a browser.
4.It also customizes a Web page to make it more useful for every users.

In ASP if variables are declared outside a procedure they can be changed by any script and if declared inside the procedure they are created and destroyed every time the procedure is executed.In ASP Response object this object is used to send output to the user and in ASP Request object this object is used to get information from the user. Application object in ASP is used to tie files together and to store variables.Application object contains information which is used my many web pages in the application.In ASP Session object is used to store information for a specific user session.In object data hold information of one specific user and one specific application .

Now let us see in details regarding Loops

Do While...Loop

Example

<%
   a=0
Do While a<5
    response.write("Hello
") a=a+1 Loop %>

In this example "a<5" and the instructions defines a response text and an increment of the variable "a". In the example, a will be increased until it gets a value of 5. Then the loop will be abandon. one can use many statements within the loop.

Do Until....Loop

Example

 
<%
a=0
Do Until a=5
    response.write("Hello<HR>")
    a=a+1
Loop
%>
 

In this example "a=5", so a will increased until it is equal to 5 and then the loop will be abandon.

Select Case....End Select

Example

 
<%
  a=5
Select Case a
   Case 1
       Response.write ("Number is 1")
   Case 2
       Response.write ("Number is 2")
   Case 3
       Response.write ("Number is  3")
   Case 4
       Response.write ("Number is 4")
   Case 5
       Response.write ("Number is  5")
   Case Else
       Response. write ("a is higher than 5")
End Select
%>
 

Sharing is Caring...

Other Related Posts:

  1. Write To File in C#
  2. Working with ASP
  3. Write To File In C++
  4. Read From File In C++
  5. AJAX Explained

{ 1 comment… read it below or add one }

Make Money Online September 13, 2009 at 12:54 am

Does a=5 ?,cant figure it.

Reply

Leave a Comment

Spam protection by WP Captcha-Free

Previous post:

Next post:

    About the Author

  • author photo

    My Name is Shabbir Bhimani and I am developer by profession in the field of applications, web and database. Currently doing full time online marketing and like to share my experiences on how you can make money online @ CodeItWell.com. Read more ...


    See how you can get in touch with me.