ASP,first,lesson,many,upcoming,will,learn,tou
Quick Search for:  in language:    
ASP,first,lesson,many,upcoming,will,learn,tou
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
ASP/ VbScript Stats

 Code: 117,337 lines
 Jobs: 143 postings

 
Sponsored by:

 

You are in:

 
Login


 

 


Latest Code Ticker for ASP/ VbScript.
Click here to see a screenshot of this code!Ultimate Forum 2
By Gurgen Alaverdian on 6/1

(Screen Shot)

Speedy ASP Discussion Forum BBS
By ASPwebServer on 6/1


[[ Learn Database and ASP by Video ]]]
By Brian Link on 5/31


Generic XML Grabber
By Kevin O'Neill on 5/31


Block User to copy Links
By Shahid allauddin on 5/31


Click here to see a screenshot of this code!geographical search
By Igor Krupitsky on 5/31

(Screen Shot)

Click here to see a screenshot of this code!CDF/Active Desktop Example without ASP
By John on 5/30

(Screen Shot)

Click here to see a screenshot of this code!CDF/Active Desktop Example with ASP
By John on 5/30

(Screen Shot)

Date & Time Function
By Marc Ripin on 5/30


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

ASP Lesson #1 - Introduction

Print
Email
 

Submitted on: 12/12/2000 8:22:11 AM
By: Daniel Larsson  
Level: Beginner
User Rating: By 10 Users
Compatibility:ASP (Active Server Pages)

Users have accessed this article 11075 times.
 

(About the author)
 
     This is the first lesson of many upcoming.<p>I will learn you what ASP is, and what to use it for in this lesson. You will not be tought any ASP Code the first lesson. This is just what it says it is.....an Introduction.<p>If you're an experienced developer, you won't get much of reading this lesson.<p>I will also tell you where to get a good Reference, and a few things about ASP Developement languages.<p>Please rate it, even if you don't like it, and tell me what can be better and what is bad.

 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for langauges that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.

In this lesson and many upcomming lessons you will eventually learn everything about ASP. In this lesson we will not go any further than try to explain how I plan to write this guide, what ASP is, where you find References, and of course the most basics of ASP Coding.
What is ASP??

ASP stands for Active Server Pages. This means that all code is generated on the server. In other words, it doesn't matter which browser you have, it doesn't matter which version you have or manufacturer. Everything is generated in the serve's software. When it's going to be showned, it prints it out in simple HTML-Code which will be seen if the user access "View Source".

If the user can't see the code, where do you then put the code? In a file! When the visitor wants to visit a page that contains ASP-Code the following procedure is made:

1.The visitor demands the page.
2. The file is generated through the server's software, which reads the ASP-Code and execute what it asks for.
3. The code which now, hopefully generated something, deletes itself from the file and everything that is showned in the visitor's Webbrowser is a simple HTML-Document.

The code, or script, which is more correct usually demands special softwares installed on the server in order for things to work. The most common is that the server is running Microsoft Internet Information Server as Software ( IIS ). This is microsoft's easy distribution of this software. Microsoft Personal Webserver has limited functions compared to IIS, But it's enough to develope ASP for a common PC-Computer.

ASP executes, like i said earlier, at the server page, but there is no Code which is called ASP. All code that is written is called VBScript(Visual Basic Script) or Jscript(Java Script). You can use any of these codelanguages to produce an ASP Page. But in this guide we will write about VBScript only. VBScript is a shorter version of Microsoft's real Visual Basic Language.



What can I use ASP for?

This is a question that has no real answer, I would say it's only your imagination that is your enemy ;). An answer like that is hard to understand for someone that hardly knows what ASP is. I'm therfor trying to explain it a little more. ASP can be used for this:

*Store and get information from a database from the Internet.
*Make your webpages more interactive for your visitors. A golden example of this is for example, show the current date and time at your page when anyone visits it.
*Make your pages more personal, by letting the visitor choose the Fonts and size he wants on the page.
*Store information about a visitor which can be used everytime that visitor comes back. And because of that remind him about something or show him his personal settings for your page.
*Make games, Guestbooks, Advertisements, Create and read cookie information etc.

Think of applications like Guestbooks, Advertisement pages, Alertpages, News pages and chatpages are all based on the same code. Only a few cosmic changes was made. A guestbook often works in a way like this: A user enters an information in a form. Than that information is stored in a long file together with all the other users information.

The advertisement page works in the same way. The users enters a text and than his text is showned together with all other texts that have been stored in a file or a database. Both the code and the princip is the same, only a few modification was made.



What will you learn?

Now we are coming to the most important of all. What will I learn?? I will teach you how to produce ASP pages in the VBScript Language. VBScript is a language exactly like many others. This means there are many different categories where you can place all the different commands which you can use.

Mainly it's these categories:

*Functions
*Objects
*Methods
*Operators
*Properties
*Statements

These categories contains many different commands which works and are used in different ways. Alls the commands are most likly used together with other commands from different categories. Therefor we will jump a little between them just to teach you the basics and the most important things. But of course, Later we will go deeper into the commands, methods and objects. In the beginning I will teach you the differents between the categories.


For those who wants to try self!

If you believe that all the commands that are used in VBScript is stored in the programmer's brain.....your WRONG! There are very many, if not endless, different commands and categories. It's about impossible for anyone to keep all this in his head. Therefor there are something called References to help you.

The difference between Guides, like this, and references is that you dont tell anything in the right way. They only show you how to use it, no information of problems, where to use it and such things. There are only short examples on how to use them. For those that have never ever before coded before, this is like Chineesee!!! IF you need a reference theres a good one at Microfofts homepage at: http://www.microsoft.com/scripting/vbscript/.



Databases, Databases, when will we ever use databases??

At a later stage we will learn how to work with a database, but think about that a database have many different ways of beeing used. This means that there are certain things that you need to know about VBScript to have any use of your database. But don't get scared, VBScript is very Easy!!!



Some basics about ASP in the first lesson

Let's go through some very basic things about ASP.

<html>

<% ASP Code %>

</html>

These lines are with a % in front or after itself are called "Blockers". This is where the code starts and stops. All ASP code must be written within these tags ( <% and %> ). If they don't stand within these tags, the code will not be executed and therfore not showned.

'Here is a comment

As soon as you would like to make a little comment to your code you make a '. Everything write to the right of the ' will not be executed in the code. You dont have to make anything to make the comment tag dissapear. If you want a comment over two rows do like this:

'comment 1
'comment 2

-

This is an underscore, this is used whenever you want your code to continue on the next row. This is usefull when you want to break a long row of code into two lines. Just use a Underscore (_) and continue on the next line. Example:

Dim Sak,_
Sak2

This is only made to make the code look easiser and much simplier to understand for the programmer. At least that's the mainreason to use an underscore.

Hope that you continue reading my ASP Guides, since in the next lesson I help you put up a Webserver for your ASP Files.

End of lesson #1!



Other 7 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this article(in the Beginner category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
1/9/2001 10:25:24 PM:Sylvio
Very clear and hrlpful Daniel
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/9/2001 10:26:04 PM:Harrison
Very clear and helpful, Daniel .
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/20/2001 11:07:53 AM:michael
this article has some helpful information, but i get distracted by the spelling and gramatical errors. for example, there is no english word
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/20/2001 11:15:29 AM:michael
i hope my previous comment should have been longer and more respectful, but was cut off without warning even though i typed a lot more in the comment box. if the author would like to email me, i would be happy to offer suggestions for correcting the text. regards, michael.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/25/2001 9:47:08 PM:George
You really should have JScript in your lessons since VBScript can only be seen by IE. email : george@gbi.cc
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/25/2001 9:48:30 PM:George
You really should have JScript on your pages since VB is only seen by IE.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/14/2002 9:54:19 PM:VP
Very helpful. Couldn't find this in other places I have look. Thanks
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular article, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | ASP/ VbScript Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.