150 likes | 264 Views
Active Server Pages. Computer Science 40S. Today’s Lesson. What are Active Server Pages (ASPs)? What are ASPs used for? What will we be doing with ASPs? How does the HTML Editor assignment fit in with our study of ASPs? Setup your Web Site (intranet)
E N D
Active Server Pages Computer Science 40S
Today’s Lesson • What are Active Server Pages (ASPs)? • What are ASPs used for? • What will we be doing with ASPs? • How does the HTML Editor assignment fit in with our study of ASPs? • Setup your Web Site (intranet) • Create and run your first ASP Application
What are Active Server Pages? An active server page is an HTML page with the file extension changed to asp. For example: default.asp The asp file extension tells the web server to run its Active Server Page Interpreter before processing the web page.
What are Active Server Pages? • HTML and ASP files are simple text files. • HTML code is a set of Tags that tell the browser how to display the web page contents on the screen • ASP code is VBScript that runs on the server and creates an HTML page. The server sends this page to the browser.
How Web Servers Work Clients send requests to the server. The server sends back text files as per request. Clients running Web Browsers Web Server
How Web Servers Work The browser on the client accepts these files and displays them. Clients running Web Browsers Web Server
How Web Servers Work The files contain tags that tell the browser how to display the file contents Clients running Web Browsers Web Server
How Web Servers Work <Center>Hello World</Center> tells the browser to center the worlds “Hello World” Clients running Web Browsers Web Server
How Web Servers Work with ASP The server will interpret the asp file and create an HTML file using the scripts on the asp file. Clients running Web Browsers Web Server
How ASP works Client sends as ASP page to the server. Server runs the VBScript that is on the ASP page. The server creates an HTML page using the VBScript code and sends this HTML page back to the client.
What is ASP used for? Since ASP can create HTML pages ‘on the fly’, ASP is used for any web site that has dynamic content (that is, information that changes). ASP is used to interact with web users in real time. Most e-commerce is done using ASP.
What will we be doing with ASP? • Learn how to ‘leverage’ our knowledge of Visual Basic to see how e-commerce works. • Every students will create and maintain their own web site. Which will include a database file that user’s can access, add to and edit using a web browser. • Every student will perfect their ASP Editor.
Setting up your Web Site • Microsoft Personal Web Server has been installed on every computer in Lab304. • Start up the program … your web site is active. • Using Notepad (or your HTML editor if its ready), create a simple web page called default.asp. • Use Internet Explorer to view the page.
Create Your First ASP Application • A web site that uses ASPs is called an application. You should think of the entire site as if it were one program. • Create an ASP that returns the time of day from the server. • Access other web sites in the computer lab.
Resources There are many resources for learning about Active Server Pages. A few links are on the class web page. http://www.frc.mb.ca/compsci/asp