Top Banner
Creating Dynamic Creating Dynamic Content on the Web Content on the Web with IIS and ASP with IIS and ASP By Fred Rodriguez By Fred Rodriguez Texas Cooperative Extension Texas Cooperative Extension
26
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 2003

Creating Dynamic Creating Dynamic Content on the Web Content on the Web

with IIS and ASPwith IIS and ASP

Creating Dynamic Creating Dynamic Content on the Web Content on the Web

with IIS and ASPwith IIS and ASPBy Fred RodriguezBy Fred Rodriguez

Texas Cooperative ExtensionTexas Cooperative Extension

Page 2: 2003

Terminology• IIS

– Internet Information Server

• ASP– Active Server Pages

Page 3: 2003

Microsoft’s Definition

Active Server Pages is an open, compile-free application environment in which you can combine HTML, scripts, and reusable ActiveX server components to create dynamic and powerful Web-based business solutions. Active Server Pages enables server-side scripting for IIS with native support for both VBScript and Jscript.

Page 4: 2003

Static Content .vs. Dynamic Content

• Static Content– Does NOT change from unless author

updates the file

• Dynamic Content– Is generated “on the fly” when the

page is called into existence

Page 5: 2003

Advantages of Dynamic Content

• Can more easily be kept current• Can adapt to user preferences• Can be maintained more easily• Information can be presented in

more than one form

Page 6: 2003

Disadvantages of Dynamic Content

• More complex• Not easily searched• Slower

Page 7: 2003

A different System for every purpose

• Application Development System• Content Management System• Information Management System• Web Development System• Document Management System

Page 8: 2003

What do they have in common?

• Information– Acquisition– Storage– Management– Presentation– Organization

Page 9: 2003

Important Functions/Subsystems

• Simple• Powerful• Web-based

– All Functions (Acquisition, Management, Storage, etc)

• Dynamic Generation of Content

Page 10: 2003

Important Functions/Subsystems

• Database Back End– Single copy of Information – Content/Format separate

• Production and Development Environments– Separate Completely– Easy Migration – Both Environment fully functional

Page 11: 2003

Competing Systems• Php • Perl• Cold Fusion• Dreamweaver• Front Page

Page 12: 2003

Why IIS and ASP?

Page 13: 2003

Fairly Popular Web Server (30%)

Page 14: 2003

Fairly Cost Effective• $81

– Windows Server 2003 – Standard Edition– Texas State Contract– Educational Pricing– Enterprise Edition $323.90

Page 15: 2003

Support• Available (but expensive)• User Groups• News Groups• Web Site (MSDN)• Internet Resources

Page 16: 2003

Active Server Pages• Easy to write• Easy to read• Easy to debug• Easy to acquire

– Web resources– Experts are out there

Page 17: 2003

Scripting Languages• Visual Basic Script • Java Script• C#

Page 18: 2003

Servers for ASP?• Windows Server 2003• Windows 2000 (Server or Client)• Windows XP • Windows NT (Server or Workstation)• Windows 9x• Apache (with Apache::ASP extension)• Solaris (with Sun One ASP)

Page 19: 2003

How do I use ASP?• Create a HTML-like file and save it with

a .asp suffix (file type)• Upload to a server• Browse the file• Did it Work?

– Yes, Great– No, note the error, fix, re-upload, try again

Page 20: 2003

What does ASP Look Like?

• Start file with language definition– <%@ LANGUAGE = VBScript %>

• Code HTML Normally– <HTML>

• <HEAD>– <TITLE>This is my first ASP File</Title>

• </HEAD>

Page 21: 2003

What Does ASP Look Like?

• Want to execute some code– <% (to start code segment)

• Response.Write “Hello World”

– %> (to return to HTML segment)

• Want value of variable in HTML segment?– <%= myvariable %>

Page 22: 2003

A Simple ASP ExampleExample 1

• <%@ LANGUAGE = VBScript %>• <%• For I = 1 to 100• Response.Write “Hello World<BR>”• Next• %>

Page 23: 2003

Another Simple Example

Example 2• <%@ LANGUAGE = VBScript %>• <TABLE BORDER=10><%• For I = 1 to 10• %><TR><%• For J = 1 to 5• %><TD BGCOLOR=RED><FONT

COLOR=YELLOW>Hello World</FONT></TD><%• Next• %></TR><%• Next• %></TABLE><%%>

Page 24: 2003

Another Simple Example

Example 3• <%@ LANGUAGE = VBScript %>• <%• Response.Write "<TABLE BORDER=10>"• For I = 1 to 10• Response.Write "<TR>"• For J = 1 to 5• Response.Write "<TD BGCOLOR=RED><FONT

COLOR=YELLOW>Hello World</FONT></TD>"• Next• Response.Write "</TR>"• Next• Response.Write "</TABLE>"• %>

Page 25: 2003

More Examples

Page 26: 2003

Conclusion• IIS and Active Server Pages

– Easy to code– Inexpensive– Available– Powerful– Dynamic