1 10/19/05CS360 Windows Programming ASP.NET. 2 10/19/05CS360 Windows Programming ASP.NET  ASP.NET works on top of the HTTP protocol  Takes advantage.

Slides:



Advertisements
Similar presentations
Unit 02. ASP.NET Introduction HTML & Server controls Postbacks Page Lifecycle.
Advertisements

Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12.
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
Building Applications using ASP.NET and C# / Session 1 / 1 of 21 Session 1.
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.
Session 6 Server-side programming - ASP. An ASP page is an HTML page interspersed with server-side code. The.ASP extension instead of.HTM denotes server-side.
16-Jun-15 HTTP Hypertext Transfer Protocol. 2 HTTP messages HTTP is the language that web clients and web servers use to talk to each other HTTP is largely.
Kashif Jalal CA-240 (072) Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 2 of…
How the web works: HTTP and CGI explained
Web architecture Dr Jim Briggs Web architecture.
Active Server Pages Chapter 1. Introduction Understand how browsers and servers interacted when the Web was young Understand what early Internet and intranet.
Definitions, Definitions, Definitions Lead to Understanding.
Hypertext Transport Protocol CS Dick Steflik.
Client, Server, HTTP, IP Address, Domain Name. Client-Server Model Client Bob Yahoo Server yahoo.com/finance.html A text file named finance.html.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
INTRODUCTION TO WEB SERVICES CS 795. What is a Web Service ? Web service is a means by which computers talk to each other over the web using HTTP and.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Web Forms. Agenda Web forms Web controls Code separation Dynamic compilation System.Web.UI.Page User controls.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College Lecture 8: WebForms — Web-based.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
Web technologies and programming cse hypermedia and multimedia technology Fanis Tsandilas April 3, 2007.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Server-side Programming using ASP.NET Web Forms Yingcai Xiao.
Introduction to Web Programming Fall 2014/2015 Some slides are based upon Web Technologies course slides, HUJI, 2009 Extended System Programming Laboratory.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Dynamic Web Sites Chris North cs3724: HCI. Presentations matt ketner, sam altman, mike gordon Vote: UI Hall of Fame/Shame?
COMP3016 Web Technologies Introduction and Discussion What is the Web?
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
ASP.NET Dr. Ralph Westfall May, Web Development Problem HTML designed to display static pages only interactive when user clicks links  can’t provide.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
Object-Oriented Application Development Using VB.NET 1 Chapter 12 Web Forms, HTML, and ASP.NET.
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.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
Application Layer 2 Figures from Kurose and Ross
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
Creating Web Applications Using ASP.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
1 Introductory material. This module illustrates the interactions of the protocols of the TCP/IP protocol suite with the help of an example. The example.
Introduction to ASP.NET1. 2 Web applications in general Web applications are divided into two parts –The server part –The client part The server part.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
1 CS 4396 Computer Networks Lab TCP/IP Networking An Example.
HTTP1 Hypertext Transfer Protocol (HTTP) After this lecture, you should be able to:  Know how Web Browsers and Web Servers communicate via HTTP Protocol.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Web Technologies Interactive Responsiveness Function Hypertext Web E-Publishing Simple Response Web Fill-in Forms Object Web « Full-Blown » Client/Server.
Christopher M. Pascucci.NET Programming CodeBehind.
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 in Definition: 1.ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites,
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Overview of Servlets and JSP
LURP Details. LURP Lab Details  1.Given a GET … call a proxy CGI script in the same way you would for a normal CGI request  2.This UDP perl.
WEB1P webarch1 Web architecture Dr Jim Briggs. WEB1P webarch2 What is the web? Distributed system Client-server system Characteristics of clients and.
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.
DEV336. demo HTTP Packet Trace GET / HTTP/1.1 Accept: text/html, application/xhtml+xml, */* Accept-Language: en-US User-Agent: Mozilla/5.0 (compatible;
Active Server Pages v.s. Java Server Pages Presenters: Lan Guo Qunying Fan Pei-Xun Wu Date:
Lesson 11. CGI CGI is the interface between a Web page or browser and a Web server that is running a certain program/script. The CGI (Common Gateway Interface)
The Common Gateway Interface (CGI) Pat Morin COMP2405.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Presentation transcript:

1 10/19/05CS360 Windows Programming ASP.NET

2 10/19/05CS360 Windows Programming ASP.NET  ASP.NET works on top of the HTTP protocol  Takes advantage of HTTP commands and policies to set up two-way, browser-to-server communication and cooperation  Web Forms model: the event-driven model of interaction finally comes to the Web

3 10/19/05CS360 Windows Programming Event-Driven Programming over HTTP  Implementing an event model over the Web requires any data related to the client-side user's activity to be forwarded to the server for corresponding and stateful processing  The server needs to process the output of client actions and trigger reactions while being aware of the overall state of the application

4 10/19/05CS360 Windows Programming States  The state of the application contains two types of information: the state of the client and the state of the session  The state of the client is easily accessible through the syntax and the implementation of the HTML element. But what about the overall state of the session?  A reentrant form is an HTML element that posts to the same page that contains it

5 10/19/05CS360 Windows Programming Web Forms  A WebForm consists of two components: the user interface (UI) and the programming (application) logic  The user interface is the visual component of a WebForm; it consists of HTML and controls specific to the Web application  The programming logic of a Web application in ASP.NET is contained in a separate file that contains the code to handle the user's interaction with the form

6 10/19/05CS360 Windows Programming HTTP  Defines how web browsers and web servers communicate with each other  Typically transmitted over TCP  HTML Hello, world

7 10/19/05CS360 Windows Programming HTTP Request GET /simple.html HTTP/1.1 Accept: */* Accept-Language: en-us Accept-Encoding: gzip, deflate If-Modified-Since: Wed, 24 Oct :12:36 GMT If-None-Match: "50b0d3ee955cc11:a78" User-Agent: Mozilla/4.0.(compatible; MSIE.6.0; Windows NT 5.1) Host: Connection: Keep-Alive [blank line]

8 10/19/05CS360 Windows Programming HTTP Response HTTP/ OK Server: Microsoft-IIS/5.0 Date: Wed, 24 Oct :12:37 GMT Content-Type: text/html Accept-Ranges: bytes Last-Modified: Wed, 24 Oct :00:53 GMT ETag: "d02acf81975cc11:a78" Content-Length: 46 [blank line] Hello, world

9 10/19/05CS360 Windows Programming HTML Forms  Forms add user input capabilities to static HTML files  Appears between and tags +

10 10/19/05CS360 Windows Programming Submit Buttons   When clicked, it submits the form to a Web server  The browser submits the form along with any input in the form’s controls o GET o POST

11 10/19/05CS360 Windows Programming GET GET /calc.html?op1=2&op2=2 HTTP/1.1. Connection: Keep-Alive [blank line]

12 10/19/05CS360 Windows Programming POST  Rather than transmit user input in the URL, with a POST command the browser passes it in the body of the HTTP request POST /calc.html HTTP/1.1. Content-Type: application/x-www-form- urlencoded Content-Length: 11 [blank line] op1=2&op2=2

13 10/19/05CS360 Windows Programming Postback  Regardless of whether a GET or a POST command is used, when input from an HTML form is submitted back to the server, we say that a “postback” has occurred

14 10/19/05CS360 Windows Programming Server-Side Processing  How do we go from the previous HTML page to this one + 4

15 10/19/05CS360 Windows Programming Solution 1  Use Common Gateway Interface (CGI)  Applications that use it are typically written in Perl  CGI applications read the input accompanying postbacks through server environment variables and standard input (stdin), and they write HTTP responses to standard output (stdout)

16 10/19/05CS360 Windows Programming Solution 2  ISAPI extension DLL  Internet Server Application Programming Interface  ISAPI extensions are Windows DLLs that are hosted by Internet Information Services  IIS forwards HTTP requests to an ISAPI DLL by calling a special function exported from the DLL  The DLL generates HTTP responses

17 10/19/05CS360 Windows Programming Solution 3  The Active Server Pages Solution  Active Server Pages lower the barrier to entry for Web developers by allowing HTML and server-side script to be freely mixed in ASP files  Scripts are written in JScript or VBScript

18 10/19/05CS360 Windows Programming ASP  Active Server Pages lower the barrier to entry for Web developers by allowing HTML and server-side script to be freely mixed in ASP files

19 10/19/05CS360 Windows Programming ASP "/> + " /> <% If Request ("op1") <> "" And Request ("op2") <> "" Then a = CInt (Request ("op1")) b = CInt (Request ("op2")) Response.Write (CStr (a + b)) End If %>

20 10/19/05CS360 Windows Programming ASP  What’s wrong with ASP?  It’s slow o Why? o Interpreted rather than compiled  Lacks encapsulation

21 10/19/05CS360 Windows Programming ASP.NET Web Forms  Web forms bring object-oriented programming to the Web  Combine ASP’s ease of use with the speed of compiled code

22 10/19/05CS360 Windows Programming ASP.NET Web Forms + void OnAdd (Object sender, EventArgs e) { int a = Convert.ToInt32 (op1.Text); int b = Convert.ToInt32 (op2.Text); Sum.Text = (a + b).ToString (); }

23 10/19/05CS360 Windows Programming Generated HTML +

24 10/19/05CS360 Windows Programming Summary  Completed pages