 2004 Prentice Hall, Inc. All rights reserved. Chapter 23 – ASP.NET Outline 23.1 Introduction 23.2.NET Overview 23.2.1.NET Framework 23.2.2 ASP (Active.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 1-1 The Web Wizards Guide to PHP by David A. Lash.
Advertisements

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Introduction to Rails.
8 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: JavaServer Pages.
E-Commerce CMM503 – Lecture 8 Stuart Watt Room C2.
Overview Environment for Internet database connectivity
Lecture 11 Server Side Interaction
Essentials for Design JavaScript Level One Michael Brooks
 2002 Prentice Hall. All rights reserved. Chapter 9: Servlets Outline 9.1 Introduction 9.2 Servlet Overview and Architecture Interface Servlet and.
Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12.
Web Server Programming
Session 13 Active Server Pages (ASP) Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 21 – Web Servers (IIS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3 System.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 21 – Web Servers (IIS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3 System.
ASP Tutorial. What is ASP? ASP (Active Server Pages) is a Microsoft technology that enables you to make dynamic and interactive web pages. –ASP usually.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 25 – Perl and CGI (Common Gateway Interface) Outline 25.1 Introduction 25.2 Perl 25.3 String Processing.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Beginning Active Server Pages Barry Sosinsky Valda Hilley Programming.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 37 - JavaServer Pages (JSP): Bonus for Java Developers Outline 37.1 Introduction 37.2 JavaServer.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Bookstore Web Application Introducing Visual Web Developer 2008 Express and the.
CIS 375—Web App Dev II ASP.NET 2 Introducing Web Forms.
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
An Introduction to ASP.NET Ed Dunhill blogs.msdn.com/edunhill SLIDE7.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Data-Enabled Web Sites: Classibooks.com & Internet Database Technologies Colin Fukai April 4, 2000 Gonzaga University.
3/8/00asp00 1 Active Server Pages from Microsoft Nancy McCracken Northeast Parallel Architectures Center at Syracuse.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University.
ASP.NET 2.0 Chapter 5 Advanced Web Controls. ASP.NET 2.0, Third Edition2 Objectives.
Elements of ASP Documents Adapted from MCDN Web Workshop ( and Webmonkey’s Introduction to Active.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 21 - Web Servers (IIS, PWS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
 2004 Prentice Hall, Inc. All rights reserved. 1 Chapter 34 - Case Study: Active Server Pages and XML Outline 34.1 Introduction 34.2 Setup and Message.
HTML. Principle of Programming  Interface with PC 2 English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine Code.
ASP.NET.. ASP.NET Environment ASP.NET is Microsoft's programming framework that enables the development of Web applications and services. It is an easy.
Database-Driven Web Sites, Second Edition1 Chapter 5 WEB SERVERS.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
 2004 Prentice Hall, Inc. All rights reserved. 1 Segment – 6 Web Server & database.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
 2004 Prentice Hall, Inc. All rights reserved. Chapter 24 – Case Study: ASP.NET and XML Outline 24.1 Introduction 24.2 Setup and Message Forum Documents.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
ASP.NET (Active Server Page) SNU OOPSLA Lab. October 2005.
Understanding Web Applications Lesson 4. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
7-1 Active Server and ADO Colorado Technical University IT420 Tim Peterson.
ASP.NET Part II Dr. Awad Khalil Computer Science Department AUC.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
ASP.NET Part I Dr. Awad Khalil Computer Science Department AUC.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
1 Introducing Web Developer Tools Rapid application development tools ASP.NET-compatible web editors –Visual Studio.NET Professional Edition –Visual Studio.
ASP – Web Programming Class  Ravi Anand. ASP – Active Server Pages What is ASP? - Microsoft Technology - Can Run using IIS/PWS/Others - Helps us create.
Computing with C# and the .NET Framework
ASP.NET Forms.
Chapter 19 PHP Part III Credits: Parts of the slides are based on slides created by textbook authors, P.J. Deitel and H. M. Deitel by Prentice Hall ©
Chapter 23 – ASP.NET Outline 23.1 Introduction NET Overview
ASP.NET Module Subtitle.
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
An Introduction to JavaScript
Presentation transcript:

 2004 Prentice Hall, Inc. All rights reserved. Chapter 23 – ASP.NET Outline 23.1 Introduction 23.2.NET Overview NET Framework ASP (Active Server Pages).NET 23.3 Setup 23.4 JScript.NET 23.5 A Simple ASP.NET Example 23.6 Web Forms 23.7 Session Tracking Cookies Session Tracking with HttpSessionState 23.8 ASP.NET and XML 23.9 Reading and Writing Text Files Connecting to a Database in ASP.NET Code-Behind Approach ASP.NET Web Services Web Resources

 2004 Prentice Hall, Inc. All rights reserved. Objectives In this lesson, you will learn: –To program ASP.NET pages using JScript.NET. –To understand how ASP.NET pages work. –To understand the differences between client-side scripting and server-side scripting. –To create Web services. –To use and manipulate XML files with ASP.NET. –To understand Web forms and code-behind files. –To be able to use session tracking in an ASP.NET application. –To use ActiveX Data Objects.NET (ADO.NET) to access a database.

 2004 Prentice Hall, Inc. All rights reserved Introduction ASP.NET –Server-side technology that dynamically builds documents in response to client requests –Can be used on a server to create Web applications –Supports over 25 programming languages –Object-oriented programming

 2004 Prentice Hall, Inc. All rights reserved NET Overview Independent from a specific programming language Promotes software reuse Include tools for porting, adapting existing software components Web services

 2004 Prentice Hall, Inc. All rights reserved NET Framework Manages and executes applications Framework Class Library (FCL) –Enforces security and supplies many other programming capabilities –Reusable components that programmers can incorporate into their applications Common Language Runtime (CLR) –Executes programs written in any.NET-compatible programming language.NET Compact Framework

 2004 Prentice Hall, Inc. All rights reserved ASP (Active Server Pages).NET Multi-tier, database-intensive applications Includes optimizations for performance, testing and security ASPX files XHTML documents –Static

 2004 Prentice Hall, Inc. All rights reserved Setup Microsoft.NET Framework.NET Framework System Development Kit (SDK) –Tools, examples, reference files and tutorials building.NET applications

 2004 Prentice Hall, Inc. All rights reserved Setup Fig. 23.1Adding ASP.NET security permissions to a folder (on the NTFS file system).

 2004 Prentice Hall, Inc. All rights reserved Setup Fig. 23.2Configuring a virtual directory as an application in IIS.

 2004 Prentice Hall, Inc. All rights reserved JScript.NET Truly object-oriented language Backward compatible with JScript Adheres to ECMA 262 Edition 4 standard Provides classes, packages, typed variables and access to.NET Framework

 2004 Prentice Hall, Inc. All rights reserved A Simple ASP.NET Example Scripting delimiters –Wrapped around Jscript.NET code –Compiled and executed on the server Page directive Specifies information needed by CLR to process file –Language attribute Specifies JScript.NET as scripting language –runat attribute with value “server” Indicates script should be processed on server

 2004 Prentice Hall, Inc. All rights reserved. Outline date.aspx (1 of 2)

 2004 Prentice Hall, Inc. All rights reserved. Outline date.aspx (2 of 2)

 2004 Prentice Hall, Inc. All rights reserved. Outline HTML generated by date.aspx (1 of 2)

 2004 Prentice Hall, Inc. All rights reserved. Outline HTML generated by date.aspx (2 of 2)

 2004 Prentice Hall, Inc. All rights reserved A Simple ASP.NET Example

 2004 Prentice Hall, Inc. All rights reserved Web Forms tag –Designate ASP.NET Web Form Web controls –HTML server controls Programmable HTML elements run on the server –Web server controls Form-like controls such as drop-down lists and text boxes –Validation controls (validators) Required field validator Range validator –User controls Created by programmer

 2004 Prentice Hall, Inc. All rights reserved Web Forms

 2004 Prentice Hall, Inc. All rights reserved Web Forms

 2004 Prentice Hall, Inc. All rights reserved. Outline name.aspx (1 of 3)

 2004 Prentice Hall, Inc. All rights reserved. Outline name.aspx (2 of 3)

 2004 Prentice Hall, Inc. All rights reserved. Outline name.aspx (3 of 3)

 2004 Prentice Hall, Inc. All rights reserved. Outline validation.aspx (1 of 4)

 2004 Prentice Hall, Inc. All rights reserved. Outline validation.aspx (2 of 4)

 2004 Prentice Hall, Inc. All rights reserved. Outline validation.aspx (3 of 4)

 2004 Prentice Hall, Inc. All rights reserved. Outline validation.aspx (4 of 4)

 2004 Prentice Hall, Inc. All rights reserved Web Forms Fig Validation error output.

 2004 Prentice Hall, Inc. All rights reserved Web Forms Fig Valid page without validation errors.

 2004 Prentice Hall, Inc. All rights reserved. Outline adRotator.aspx (1 of 4)

 2004 Prentice Hall, Inc. All rights reserved. Outline adRotator.aspx (2 of 4)

 2004 Prentice Hall, Inc. All rights reserved. Outline adRotator.aspx (3 of 4)

 2004 Prentice Hall, Inc. All rights reserved. Outline adRotator.aspx (4 of 4)

 2004 Prentice Hall, Inc. All rights reserved. Outline ads.xml (1 of 2)

 2004 Prentice Hall, Inc. All rights reserved. Outline ads.xml (2 of 2)

 2004 Prentice Hall, Inc. All rights reserved Web Forms Fig ASPX page with an AdRotator.

 2004 Prentice Hall, Inc. All rights reserved Session Tracking Personalization Protection of privacy Cookies.NET’s HttpSessionState object Use of input form elements of type “hidden” URL rewriting

 2004 Prentice Hall, Inc. All rights reserved Cookies Customize interactions with Web pages Stored by a Web site on an individual’s computer Reactivated each time the user revisits site

 2004 Prentice Hall, Inc. All rights reserved. Outline cookie.aspx (1 of 2)

 2004 Prentice Hall, Inc. All rights reserved. Outline cookie.aspx (2 of 2)

 2004 Prentice Hall, Inc. All rights reserved Cookies

 2004 Prentice Hall, Inc. All rights reserved Session Tracking with HttpSessionState

 2004 Prentice Hall, Inc. All rights reserved. Outline optionsPage.aspx (1 of 6)

 2004 Prentice Hall, Inc. All rights reserved. Outline optionsPage.aspx (2 of 6)

 2004 Prentice Hall, Inc. All rights reserved. Outline optionsPage.aspx (3 of 6)

 2004 Prentice Hall, Inc. All rights reserved. Outline optionsPage.aspx (4 of 6)

 2004 Prentice Hall, Inc. All rights reserved. Outline optionsPage.aspx (5 of 6)

 2004 Prentice Hall, Inc. All rights reserved. Outline optionsPage.aspx (6 of 6)

 2004 Prentice Hall, Inc. All rights reserved.

Outline recommendationsPage.aspx (1 of 3)

 2004 Prentice Hall, Inc. All rights reserved. Outline recommendationsPage.aspx (2 of 3)

 2004 Prentice Hall, Inc. All rights reserved. Outline recommendationsPage.aspx (3 of 3)

 2004 Prentice Hall, Inc. All rights reserved ASP.NET and XML ASP.NET provides classes and built-in functionality to manipulate XML files Guest book stores posts in XML and uses an XSL output posts

 2004 Prentice Hall, Inc. All rights reserved. Outline posts.xml (1 of 1)

 2004 Prentice Hall, Inc. All rights reserved. Outline guestbook.aspx (1 of 4)

 2004 Prentice Hall, Inc. All rights reserved. Outline guestbook.aspx (2 of 4)

 2004 Prentice Hall, Inc. All rights reserved. Outline guestbook.aspx (3 of 4)

 2004 Prentice Hall, Inc. All rights reserved. Outline guestbook.aspx (4 of 4)

 2004 Prentice Hall, Inc. All rights reserved. Outline formatting.xsl (1 of 3)

 2004 Prentice Hall, Inc. All rights reserved. Outline formatting.xsl (2 of 3)

 2004 Prentice Hall, Inc. All rights reserved. Outline formatting.xsl (3 of 3)

 2004 Prentice Hall, Inc. All rights reserved.

23.9 Reading and Writing Text Files System.IO namespace –Reading and writing to files and streams –FileInfo and Directory Methods and properties to retrieve information and perform basic operations on files and directories –FileStream, StreamReader and StreamWriter Read and write content to and from a file

 2004 Prentice Hall, Inc. All rights reserved Reading and Writing Text Files

 2004 Prentice Hall, Inc. All rights reserved Reading and Writing Text Files

 2004 Prentice Hall, Inc. All rights reserved Reading and Writing Text Files

 2004 Prentice Hall, Inc. All rights reserved Reading and Writing Text Files

 2004 Prentice Hall, Inc. All rights reserved. Outline mailinglist.aspx (1 of 8)

 2004 Prentice Hall, Inc. All rights reserved. Outline mailinglist.aspx (2 of 8)

 2004 Prentice Hall, Inc. All rights reserved. Outline mailinglist.aspx (3 of 8)

 2004 Prentice Hall, Inc. All rights reserved. Outline mailinglist.aspx (4 of 8)

 2004 Prentice Hall, Inc. All rights reserved. Outline mailinglist.aspx (5 of 8)

 2004 Prentice Hall, Inc. All rights reserved. Outline mailinglist.aspx (6 of 8)

 2004 Prentice Hall, Inc. All rights reserved. Outline mailinglist.aspx (7 of 8)

 2004 Prentice Hall, Inc. All rights reserved. Outline mailinglist.aspx (8 of 8)

 2004 Prentice Hall, Inc. All rights reserved Reading and Writing Text Files

 2004 Prentice Hall, Inc. All rights reserved Connecting to a Database in ASP.NET OleDbDataReader object –Reads data from a database OleDbConnection object –Represents connection to database OleDbCommand object –Two parameters queryString –Contains SQL to execute Database connection ExecuteReader DataSet –Set of data and includes the tables that contain and order it OleDbDataAdapter –Retrieve information from database and place resulting information in DataSet

 2004 Prentice Hall, Inc. All rights reserved. Outline authors.aspx (1 of 5)

 2004 Prentice Hall, Inc. All rights reserved. Outline authors.aspx (2 of 5)

 2004 Prentice Hall, Inc. All rights reserved. Outline authors.aspx (3 of 5)

 2004 Prentice Hall, Inc. All rights reserved. Outline authors.aspx (4 of 5)

 2004 Prentice Hall, Inc. All rights reserved. Outline authors.aspx (5 of 5)

 2004 Prentice Hall, Inc. All rights reserved. Outline imageHeader.ascx (1 of 1)

 2004 Prentice Hall, Inc. All rights reserved. Outline Web.config (1 of 1)

 2004 Prentice Hall, Inc. All rights reserved Code-Behind Approach Alternative method of adding scripts to make static content dynamic Not included in the.aspx file Must be compiled first

 2004 Prentice Hall, Inc. All rights reserved. Outline adRotator.aspx (1 of 3)

 2004 Prentice Hall, Inc. All rights reserved. Outline adRotator.aspx (2 of 3)

 2004 Prentice Hall, Inc. All rights reserved. Outline adRotator.aspx (3 of 3)

 2004 Prentice Hall, Inc. All rights reserved. Outline adRotator.aspx.js (1 of 2)

 2004 Prentice Hall, Inc. All rights reserved. Outline adRotator.aspx.js (2 of 2)

 2004 Prentice Hall, Inc. All rights reserved Code-Behind Approach Fig Using the command prompt to compile the code-behind.

 2004 Prentice Hall, Inc. All rights reserved Code-Behind Approach Fig Output of AdRotator.aspx using the code-behind method.

 2004 Prentice Hall, Inc. All rights reserved ASP.NET Web Services Enables distributed computing by allowing one machine to call methods on other machines Defining the Web Service –Remote machine Store Web service Web-service methods –Remote Procedure Call (RPC) –Business-to-business (B2B) transactions Viewing the Web Service –Service Description Web Service Description Language (WSDL)

 2004 Prentice Hall, Inc. All rights reserved. Outline number.asmx (1 of 2)

 2004 Prentice Hall, Inc. All rights reserved. Outline number.asmx (2 of 2)

 2004 Prentice Hall, Inc. All rights reserved ASP.NET Web Services Links to Web service methods Link to service description Fig ASMX file rendered in Internet Explorer.

 2004 Prentice Hall, Inc. All rights reserved ASP.NET Web Services Fig Service description for a Web service.

 2004 Prentice Hall, Inc. All rights reserved ASP.NET Web Services Fig Invoking a method of a Web service from a Web browser.

 2004 Prentice Hall, Inc. All rights reserved ASP.NET Web Services Fig Results of invoking a Web-service method from a Web browser.

 2004 Prentice Hall, Inc. All rights reserved Web Resources msdn.microsoft.com/netframework