Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…

Slides:



Advertisements
Similar presentations
Introduction to .NET Framework
Advertisements

Tahir Nawaz Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a.
Introduction to ASP.NET
Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12.
11 ASP.NET Slides based off:. 22 B ACKGROUND - W EB A RCHITECTURE Web Server PC/Mac/Unix/... + Browser Client Server Request:
Objectives In this session, you will learn to:
Building Applications using ASP.NET and C# / Session 1 / 1 of 21 Session 1.
Kashif Jalal CA-240 (072) Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 2 of…
Web-Based Applications
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
Introduction to ASP.NET
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Tahir Nawaz Visual Programming C# Week 2. What is C#? C# (pronounced "C sharp") is an object- oriented language that is used to build applications for.
 Mark Friedman Architect Developer Division Microsoft Corporation.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
ASP.NET
INTRODUCTION TO WEB DATABASE PROGRAMMING
Introduction to ASP.NET
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.
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 2: The ASP.Net Template Dave.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Introduction to .Net Framework
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
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.
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
An Introduction to ASP.NET Ed Dunhill blogs.msdn.com/edunhill SLIDE7.
Overview of Previous Lesson(s) Over View  Server controls are small building blocks of the graphical user interface, which includes  Text boxes  Buttons.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
ASP.NET The.NET Framework. The.NET Framework is Microsoft’s distributed run-time environment for creating, deploying, and using applications over the.
ASP.NET  ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required.
Advanced Web Forms with Databases Programming Right from the Start with Visual Basic.NET 1/e 13.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
© Minder Chen, ASP.NET 2.0: Introduction - 1 ASP.NET 2.0 Minder Chen, Ph.D. Framework Base Class Library ADO.NET: Data & XML.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
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.
Overview of Previous Lesson(s) Over View  SDI programs  The Application Wizard can generate single-document interface (SDI) applications that work.
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.
Module 1: Working with ASP.NET. Overview Introducing ASP.NET Creating Web Forms Adding ASP.NET Code to a Page Handling Page Events Discussion: ASP vs.
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
PAGE DIRECTIVES. Page Directives  They are instructions, inserted at the top of an ASP.NET page, to control the behavior of ASP.NET pages.  So it is.
Intro to dot Net Dr. John Abraham UTPA CSCI 3327.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
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,
ASP.NET 4 Unleashed Chapter 1. .aspx page: contains C# script and HTML code including tags. Listing 1.1 FirstPage.aspx.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
ASP.NET (Active Server Page) SNU OOPSLA Lab. October 2005.
Module 4: Creating a Web Application with Web Forms
Understanding Web Applications Lesson 4. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web.
Introduction to ASP.NET What is ASP.NET and how is different from ASP –ASP: server side technology for creating dynamic web pages using scripting languages.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
Overview of Previous Lesson(s) Over View  ASP is a technology that enables scripts in web pages to be executed by an Internet server.  ASP.NET is a.
ASP.NET – Active Server Pages ASP.NET is a server-side technology for developing web applications based on the.NET Framework.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Building Custom Controls with ASP.NET and the Microsoft ®.NET Framework Rames Gantanant Microsoft Regional Director, Thailand
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.
Sergey Sidorov PhD student, computer software chair Computer Science department.
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
ASP.NET Architecture Mike Taulty Developer & Platform Group Microsoft Ltd
1 Introducing Web Developer Tools Rapid application development tools ASP.NET-compatible web editors –Visual Studio.NET Professional Edition –Visual Studio.
Web Development Using ASP .NET
ASP.NET
Presentation transcript:

Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…

Chapter – ONE: Objectives

Static and Dynamic Web Applications Static Web pages –Created with HTML controls Dynamic Web pages –Allow user to interact with the Web page –Changes appearance or content –Created with Microsoft’s Active Server Pages.NET (ASP.NET) Used to build server-side Web applications

Processing a Request for a Web Page

ASP.NET Main ASP.NET applications –Web Forms Used to process forms and develop cross- browser applications Uses.aspx file extension –Web Services Other applications can interact with your program Uses.asmx file extension

Web Forms ASP.NET pages within an ASP.NET application –Identified with file extension.aspx 2 logical areas: –HTML template Contains design layout, content, and controls –Collection of code commonly located behind Web Form

HTML Server Controls Similar to HTML controls except processed by server Write runat=“server” to transform HTML control into HTML Server control Controls have closing tag, or end with /> HTML control: – HTML Server control: – Yes

ASP.NET Server Controls Creates HTML code ASP.NET controls usually identified with prefix asp: followed by name of the control Types of ASP.NET Server Controls –ASP.NET Form Controls (Web controls) –Data Validation Controls –User Controls –Mobile Controls

Browser Source Code Look at the browser’s source code for each ASP.NET page to understand what the Web server is sending to the browser –ASP.NET code is never sent to the browser –Only HTML tags, along with client-side scripts, are sent to the browser Many errors are related to the syntax of the HTML that is sent to the browser, such as a missing closing tag, or a missing quotation mark You can quickly locate HTML syntax errors

Server Controls within Visual Studio.NET

Code Behind the Page Written in an ASP.NET-compatible language File extension is.vb if code is written in Visual Basic.NET Compiled code behind the page is the class definition for the page When you build the application, you compile the code into an executable file stored in the bin directory

Code Behind the Page

Postback Posting back data into form The _ViewState hidden form field –Very long encoded string –Contains information required to maintain form data across multiple page requests –Value changes each time form is reposted EnableViewState property –Turns postback feature on or off. To turn off: –

Page Class Events The first time a page is requested by a client, a series of page events occurs –Page_Init – initializes page control hierarchy –Page_Load – loads any server controls into memory and occurs every time page is executed –Server control events – action and change events occur when page is posted back to the server –Page_PreRender – occurs immediately before control hierarchy is rendered and sent to the browser –Page_Unload –removes page from server’s memory

Page Class Event Cycle

Locating Your ASP.NET Application Web Server is called Internet Information Server –C:/Inetpub/wwwroot maps to Develop on local Web server or test server Deploy Web application to production Web server on the Internet You can transfer Web application files using File Transfer Programs (FTP)

Web Services Exposes part of a program over the Internet Web Service file has.asmx file extension Uses open standards so it’s supported across applications and platforms Used to create business-to-business applications Can share data with other partners

Tara Store Web Services

The.NET Framework An architectural model for creating programs that interface with the operating system and base class libraries Contains a hierarchical set of Base Class Libraries Base class libraries are code libraries that provide general functions

Namespaces Organizes base class libraries Top namespace is System All Web Forms inherit the System.Web.UI namespace System.Web.UI contains classes for controls used on Web Forms –HTML Server controls –ASP.NET Server controls (Web controls)

HTML Server Controls

ASP.NET Server Controls

Common Language Runtime Each.NET language compiles into a common intermediate language and common type system (CTS) Assembly contains compiled.NET program The compiled.NET program contains the intermediate language and metadata Metadata describes the assembly contents

Building the application

“Some” Definitions… Namespace: A namespace refers to a logical grouping of types or identifiers used in a program. Event Handler: An event handler is a method that is executed in response to an event. Array: An array is a collection of homogenous objects. It is a group of elements of the same type that share a common name. The size of an array is fixed and cannot be changed at runtime. ArrayList: An ArrayList is a collection of heterogeneous elements- elements of different types. Unlike an array, its size can be changed dynamically HashTable: A HashTable is a collection of heterogeneous objects that can be referred using either an index or a key. Elements of an ArrayList can be referred to using an index only Web Services: A web service is SOAP based, platform– independent software component that exposes itself through open communication channels of the web applications running on potentially different platforms. Application State: This is a state management technique that allows objects to be stored and then globally accessed or shared by multiple modules of the application. In ASP.NET, application state is maintained by the class HttpApplicationState.

Session State: A session is the period of a connection between a server and a client. The Session State allows storage of objects in a user’s session. A session can be stored in one of the following ways. –InProc –State Server –SQL Server VIEWSTATE: This is a client-side state management technique that continues the state of server controls by maintaining the state of pages across postbacks. The view state is an encoded hashed string and is stored in a hidden field called __VIEWSTATE. Assembly: An assembly is a group of resources and types, along with the metadata about those resources and types, deployed as a single unit. Just In Time Compiler: The Just In Time Compiler or the JIT is responsible for compiling units of code and caching them at runtime as and when they are needed. Since the compilation occurs at runtime, it is known as a Just In Time Compilation..NET Framework Class Library: The.NET Framework Class Library (FCL) is a set of managed classes that are responsible for providing access to the system services in the managed environment of Microsoft.NET The Common Type System: (CTS) is a standard that defines the necessary rules for type interoperability for the languages targeting the.NET environment. The common type system supports the following types. –Value Types –Reference Types “Some” Definitions…

Summary ASP.NET pages can contain programs written in a variety of programming languages. Web Forms end in.aspx. Web Services end in.asmx. User controls end in.ascx. The term “ASP.NET pages” and “Web Forms” are synonymous. The entire ASP.NET Web page is a class called the Page class. The.NET framework is the architectural framework in which ASP.NET applications are created.

Summary (continued) Web Services allow you to expose a program interface publicly to other businesses and applications. At compile time, all languages must support the same common.NET data types. Page class renders HTML and Server code to the browser. The Page class contains the code behind the page, which is located in a separate file. You need a Web server to post your pages and a platform that supports the.NET Framework. There are a variety of help resources within Visual Studio.NET and on the Internet.