Computing with C# and the .NET Framework

Slides:



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

HyperText Markup Language (HTML). Introduction to HTML Hyper Text Markup Language HTML Example The structure of an HTML document Agenda.
Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12.
1 Chapter 12 Working With Access 2000 on the Internet.
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
Web-Based Applications
Chapter 1: An Introduction To ASP.NET Web Programming
World Wide Web1 Applications World Wide Web. 2 Introduction What is hypertext model? Use of hypertext in World Wide Web (WWW) – HTML. WWW client-server.
WWW and Internet The Internet Creation of the Web Languages for document description Active web pages.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
ASP.Net, Web Forms and Web Controls 1 Outline Introduction Simple HTTP Transaction System Architecture Creating and Running a Simple Web Form Example Web.
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.
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.
DR.JOHN ABRAHAM PROFESSOR UTPA ASP.NET. ACTIVE SERVER PAGES (ASP) Web application development environment Web applications use web browser to display.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Object-Oriented Application Development Using VB.NET 1 Chapter 12 Web Forms, HTML, and ASP.NET.
Overview of Previous Lesson(s) Over View  Server controls are small building blocks of the graphical user interface, which includes  Text boxes  Buttons.
Chapter 16 The World Wide Web Chapter Goals ( ) Compare and contrast the Internet and the World Wide Web Describe general Web processing.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Server-side Scripting Powering the webs favourite services.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
Beginning Web Site Development Module 1 – Dynamic Web Site Development Fundamentals of building dynamic Web sites with ASP.NET 2.0 and C# Version.
Basic HTML Hyper text markup Language. Re-cap  … - The tag tells the browser that this is an HTML document The html element is the outermost element.
Creating Web Applications Using ASP.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 30 – Bookstore Application: Client Tier Introducing.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
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 
CA Professional Web Site Development Class 2: Anatomy of a Web Site and Web Page & Intro to HTML.
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.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
Module 4: Creating a Microsoft ASP.NET Web Form. Overview Creating Web Forms Using Server Controls.
Session 4: HTML and Web Server Controls. Outline Creating Web Forms Using Server Controls HTML Server Controls Web Server Controls Writing ASP Code Inline.
ASP.Net, Web Forms and Web Controls 1 Outline Session Tracking Cookies Session Tracking with HttpSessionState.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Chapter 1 Getting Started with ASP.NET Objectives Why ASP? To get familiar with our IDE (Integrated Development Environment ), Visual Studio. Understand.
Online PD Basic HTML The Magic Of Web Pages
Introduction to HTML.
HTML Basics.
ASP.NET Forms.
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
Internet Programming Chapter 9: State Management in ASP.NET
Web Forms, HTML, and ASP.NET
Chapter 8 User Controls.
Introduction to Client-Server Programming
Chapter 2 Client/Server Applications
Florida Gulf Coast University
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 ©
Microsoft Office Illustrated
Client side & Server side scripting
Chapter 27 WWW and HTTP.
FORM OBJECT When creating an interactive web site for the Internet it is necessary to capture user input and process this input. Based on the result of.
Forms, cont’d.
Static and Dynamic Web Pages
ASP.NET.
Chapter 16 The World Wide Web.
Document Structure & HTML
HyperText Markup Language
Web Servers (IIS and Apache)
Presentation transcript:

Computing with C# and the .NET Framework Chapter 16 ASP.NET

HTML HTML (Hypertext Markup Language) Adds tags to specify formatting of web pages Tags use angle brackets Some like <br> require no text information Others like <h1> indicate a size for text included up to the </h1> tag <h1> is a start tag </h1> is an end tag

New paragraph (after a blank line). <em> ... </em> <br> Break to the next line. <p> New paragraph (after a blank line). <em> ... </em> Emphasize the text. <strong>...</strong> Strongly emphasize the text. <title>... </title> Title, displayed separately from text. <h1>... </h1> Top-level header. <h3>... </h3> Third-level header., (lowest is sixth). <u1> ... </u1> An unordered list. <1i> Element of a list. <a>... </a> An anchor, a hypertext link. <img> An image. <form>…</form> Contains controls Figure 16.1 Some HTML tags

Web Server Controls Add user interface controls to a web page Run on server Textbox, for example <asp:textbox id="Order" Columns="20" runat="server" /> To handle events, either add code to the web page or use a separate code behind C# program

Adding script code A button web control <asp:button id="submit" Text="Submit" runat="server“ onclick="Submit_Click" /> onclick attribute indicate event handler Script adds C# code to web page to handle click <script language="c#" runat="server"> public void Submit_Click(Object Sender, EventArgs e) {output.Text= "You ordered " + Order.Text;} </script>

Using code behind Page directive name source file and class name <%@ Page Src="GetOrderBehind.aspx.cs" Inherits="GetOrderBehind"%> No longer use onclick attribute <asp:button id="submit" Text="Submit" runat="server" />

Code behind GetOrderBehind.aspx.cs protected Button submit; // declare control private void Page_Init() { submit.Click += new EventHandler(Submit_Click); } // register event handler public void Submit_Click(Object Sender, EventArgs e) {output.Text= "You ordered " + Order.Text;} // implement event handler

Deploying a web page Use Internet Information Server (IIS) available on Windows 2000, Windows XP and various hosting sites. Create a virtual directory linked with the folder containing your code. (ch16 used here) Web page uses .aspx extension Enter URL in browser. If IIS on local machine http://localhost/ch16/GetOrder.aspx

GET and POST Using get in the form tag sends an HTTP GET request, with data appended to the URL <form method="get" runat="server"> Using post sends an HTTP POST request with data sent after the request headers <form method="post" runat="server">

Three-tiered architectures Client -- front tier, user interface Servlet – middle tier, implements business logic Database – back tier, contains persistent data Client sends data to server Server queries database Server returns response to client

Session Tracking HTTP is stateless, and does not save information about the client Session property holds HttpSessionState to keep data between connections Store an ArrayList in the Session to hold user’s order, which is updated at each connection by that user. A new user has a different Session