|
||||||
ASP (Active Server Pages) is a Microsoft technology that can be used to build dynamic web pages. This How to shows how to get up and running with ASP ASAP.
There are two things to remember when creating an ASP (an Active Server Page):
So, before creating an ASP it may be worth looking at those two points in a little more depth. ASP is a Technology, not a Programming LanguageMany people believe that ASP is a programming language - it's not; it is piece of software that sits on the server and interprets the scripting languages; for example, it is possible to use:
Interestingly it is actually possible to mix and match scripting languages in the same ASP web page. All the Action Takes Place on the Server, not the User's PCJavascript and VBScript can be used in any web page, and if they are then the code is downloaded to the user's computer and then run by the browser; however, there can be problems with doing this:
The solution is to run everything on the server, not the client (the user's pc); if web site developers run all of the code on the server then they can guarantee that the code will run, and they only need return the results of any processing to the user - hence ASP. Of course, there is another advantage to using ASP - all of the code is hidden and all that the user sees is the output from the script. However, there is a potential disadvantage to be aware of - if the server is doing all of the processing then there is the possibility of it becoming overloaded, especially if the web site becomes very popular. All Servers are not Created Equal: Does My Server Support ASP?ASP is a Microsoft technology, and so one might expect ASP to be only available on Microsoft web servers with IIS (Internet Information Services) and normally that is the case; however, there are solutions for anyone with Linux servers:
Of course, the easiest answer may be to choose a suitable ISP (Internet Service Provider) and let them do all of the hard work. Choosing an EditorOnce the web server has been set up, or arrangements made with an ISP, then consideration can be given to the ASP itself - and for this the developer will only need a text editor. Editors such as Notepad on Windows or Emacs (even Nano or Pico) on Linux will suffice, but it's worth looking into editors such as Notepad++ which have benefits such as:
Notepad++ even has a word count function (see The Notepad++ Word Count). Writing an ASPThe ASP itself can be a mixture of scripting languages; in this case Javascript and VBScript are used in the same page: <SCRIPT LANGUAGE="JavaScript" RUNAT="Server">
function SayHelloJavascript() {
return "Hello, I'm a JavaScript function";
}
</SCRIPT>
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Function SayHelloVBScript
SayHelloVBScript =" Hello, I'm a VBScript function"
End Function
</SCRIPT>
<%
Response.Write(SayHelloJavascript() & "<BR>")
Response.Write(SayHelloVBScript & "<BR>")
%>
The code can now be saved (via the editor's FTP functionality) to the server and then called from a web browser, for example: http://<My Web Server>/Hello.asp
ConclusionSo, remember:
Any web designer with access to that technology has a very powerful tool at their disposal.
The copyright of the article How to Start Programming in ASP in ASP Programming is owned by Mark Alexander Bain. Permission to republish How to Start Programming in ASP in print or online must be granted by the author in writing.
Comments
Jan 3, 2009 4:09 AM
Guest :
Jan 19, 2009 6:13 PM
Guest :
Oct 1, 2009 3:58 AM
Guest :
Oct 8, 2009 1:46 PM
Guest :
Oct 9, 2009 4:36 AM
Guest :
5 Comments
|
||||||
|
|
||||||
|
|
||||||