Download presentation
Presentation is loading. Please wait.
1
IS 4506 Interactive Clients & Servers
2
Overview Fat Client versus Fat Server Spectrum of Web content formats
Active Server Pages Active Server Page elements Use of the script tag
3
Client /Server Architecture
PCs Middleware Server
4
Web Client/Server Architecture
Web Browser INTERNET INTRANET HTTP Server
5
Spectrum of Web Content Formats
Active Personalization and Transaction Processing Interactive Applications Data-bound Applications Dynamic HTML Linked (Basic) Content Static
6
Active Server Pages Dynamic content Easy database connectivity
Scalable server-side solution Integrated state and user management Reusable software model
7
Active Server Page Elements
ASP scripts Objects ASP built-in objects Installable ASP objects Installable ASP components Component creation
8
ASP Scripts Flexible server-side scripting Exposes object model
Components accessed using properties and methods Temperature conversion example VBScript code
9
Objects ASP built-in objects Installable ASP objects
10
ASP Built-in Objects Server Object Application Object Session Object
Request Object Response Object ObjectContext Object
11
Component Creation Created in any language
Components follow the COM standard Accessed only by the server Extend ActiveX server components
12
Use of the Script Tag Script tag on Active Server Pages <% Code
%>
13
ASP Examples Hello.htm Hello.asp Form.htm
14
Hello.htm <HEAD> <TITLE> Static Hello </TITLE>
<BODY> <FONT SIZE = 7 > Hello World!<BR> </FONT> </BODY> </HTML>
16
Hello.asp <%@ LANGUAGE = VBScript %> <HEAD>
<TITLE>Active Hello Page </TITLE> </HEAD> <BODY> <% For I = 3 To 7 %> <FONT SIZE=<%= I %>> Hello World!<BR> <% Next %> </FONT> </BODY> </HTML>
18
Form.htm <HTML> <HEAD><TITLE>Order</TITLE></HEAD> <H2>Sample Order Form</H2> <P>Please provide the following info, then click Submit:</P> <FORM METHOD="POST" ACTION="response.asp"> Title: <INPUT NAME=“title” SIZE=“5”><BR> First Name: <INPUT NAME="fname" SIZE="48"><BR> Last Name: <INPUT NAME="lname" SIZE="48"> <P><INPUT TYPE=SUBMIT><INPUT TYPE=RESET></P> </FORM> </BODY> </HTML>
20
Response.asp <%@ LANGUAGE = VBScript %> Thank you, <%
Title = Request.Form("title") LastName = Request.Form("lname") If Title = "mr" Then %> Mr. <%= LastName %> <% ElseIf Title = "ms" Then %> Ms. <%= LastName %> <% Else %> <%= Request.Form("fname") & " " & LastName %> <% End If %> for your order.<BR>
22
Response2.asp <%@ LANGUAGE = VBScript %> <%
Title = Request.Form("title") LastName = Request.Form("lname") FirstName = Request.Form("fname") Response.Write "Thank you " If Title = "mr" Then Response.Write "Mr." & LastName ElseIf Title = "ms" Then Response.Write "Ms." & LastName Else Response.Write FirstName & " " & LastName End If Response.Write " for your order!!" %>
23
mail.asp <%@ LANGUAGE = VBScript %> <% Dim Message
Set message = CreateObject("CDONTS.NewMail") message.send Request.Form("From"), Request.Form("To"), Request.Form("Subject"), Request.Form("text") Set message = Nothing %> The Following Has Been Sent: <p>From: <%= Request.Form("From") %> </p> <p>To: <%= Request.Form("To") %> </p> <p>Subject: <%= Request.Form("Subject") %> </p> <p>Text: <%= Request.Form("text") %> </p>
24
Lab 11: Active Server Pages
25
Review Spectrum of Web content formats Active Server Pages
Active Server Pages elements Use of the script tag
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.