ASP Introduction

Web Programming with ASP

ASP (Active Server Pages) is a WEB-based technology that was developed as an application program, a program text which is then executed on the server. The program of this text can be a VB-Script, Java Script or other scripts such as PERL. Courses VB-Script or Java Script in the beginning is a program that can only be executed in the WEB-Browser (as Client). With ASP, then this technique can be applied. ASP program can be "embedded" directly on HTML text by giving the initial code in the form of <% and closed with%>. Symbol is called a script delimiter.
<% ... ... .. / / Asp programs %> <HTML> Text in HTML format <% ... ... .. / / Asp programs %> The following HTML text .... </ HTML>
Before the Web-Server gives HTML text to the Web-Client, then all instructions are arriving in <% and%> will be executed first. The file containing the ASP program is not usually given a name *.html * but .asp, to indicate that part of the program will be executed on the server. The result of the execution and then along with other HTML text is sent as a result of the Web Client. To be able to use ASP, then the server must be installed at least IISv3.0 (Internet Information Server) on Windows NT or Windows 98 with Personal Web Server (PWS) with ASP as an additional option.
Keep in mind, that data is brought to the client should be wrapped with an HTML format that is data with <HTML> .... </ HTML>. ASP program data is placed anywhere on the file. However, the resulting output must follow the syntax of HTML.
ASP Program Examples:
<% Response.Write ("<HTML>") Response.Write ("The text displayed on the Client <BR>") Response.Write ("</ HTML>") %> Response.Write () is an ASP object method Write (), which function to send strings to the screen.   <HTML> <% Response. Write ("The text displayed on the Client <BR>") %> </ HTML>
Because ASP can be run with different programming languages, the default language used is VBScript. To use another language as the default, then the language must be declared at the beginning of the line.
Examples of using JavaScript (or JScript):
<% @ LANGUAGE = "Java Script"%>
Because the default language can be changed in the Registry HKEY_LOCAL_MACHINE\DefaultLanguage, then the program should provide the default language explicitly.
<% @ LANGUAGE = "VBScript"%> <HTML> <% response.Write ("The text displayed on the Client <BR>") %> </ HTML>


Post a Comment