1 / 16

Active Server Pages

Active Server Pages. Points of Interest Chapters 1-4. ASP versus HTML. Major differences? What can ASP do that HTML cannot?. Active Web Sites. ActiveX controls - Visual C++ or Visual Basic Create a functionality Java Scripting Languages (VBScript, JavaScript) ASP and Dynamic HTML.

jersey
Download Presentation

Active Server Pages

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Active Server Pages Points of Interest Chapters 1-4

  2. ASP versus HTML • Major differences? • What can ASP do that HTML cannot?

  3. Active Web Sites • ActiveX controls - Visual C++ or Visual Basic • Create a functionality • Java • Scripting Languages (VBScript, JavaScript) • ASP and Dynamic HTML

  4. Running ASP • PWS, IIS, Chilisoft

  5. ASP Pitfalls and Editing • Open from the server URL instead of the pathname. • What does P&U primarily use for an editor? • Did people get InterDev 6.0 yet?

  6. ASP Objects • Request: to get information from the user • Response: to send information to the user • Server: to control the Internet Information Server • Application: to share application-level information and control settings for the lifetime of the application • Session: to store information about and change settings for the user's current Web-server session • ObjectContext: (used mostly with MTS)

  7. ASP Objects • Each set of objects has a set of functions it can perform called methods and one or more properties • value = object.property • value = object.method() • Some newer objects at http://msdn.microsoft.com/workshop/server/asp/comtutorial.asp

  8. Order of Execution • global.asa (Text file with details about an ASP application, such as when it should begin and end [more in CH9]) • Server-side includes • <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT> • <!--#include file="header.inc"--> (refers to current directory) • <!--#include virtual="common/header.inc"--> (refers to root of system) • Jscript/JavaScript tagged within <SCRIPT> • HTML with Scripts tagged within <% … %> • VBScript tagged within <SCRIPT> tags

  9. A sample (from ASP text) • Using a form to get information and display it. . .

  10. Variables • Naming variables in VBScript • 255 characters • Must begin with an alphabetical • Must not contain an embedded period • Not case-sensitive

  11. The Variant • All variables in with different data types are of one type • variant • Can use the TypeName () funtion to determine the subtype of the variant • PieceofString = 5 • WhatTypeofVar = TypeName (PieceofString)

  12. Conversions • Since variants are automatically a subtype when a value is assigned to them, sometimes one needs to change the subtype • Check page 111-112) for functions

  13. Some Interesting Items • Assignment Operator Number1 = 2 Number1 = Number1 + 1 • Comparison If Number1 = 2 Then. . . • Concatenating Variants (subtype string) strConcatenate = "Helter" & "Skelter" strConcatenate2 = "Helter" & " " & "Skelter" • Naming Conventions (114)

  14. Dim and Option Explicit • DIM (aka dimension) Dim ComputerSystem ComputerSystem = "Amiga" • Option Explicit: every variable in the program must be explicitly declared in the code before it is used. • First line in a client-side script • Before <HTML> when using server-side <%Option Explicit%>

  15. Variable Scope • Local Variables (122-123) • Global Variables (125) <% strGlobal = "Global or Script Level Variable"%> • Private strGlobal (just within script declared) • If in client-side ends when script does • If in a server-side <% %> should last in ASP page/session

  16. Arrays and Multi-Dimensional Arrays • Declaring • Loop • Dim and Redim • Preserve • Multi-dimensional

More Related