Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Introduction to ASP.NET1

2 2 Web applications in general Web applications are divided into two parts –The server part –The client part The server part is usually programmed as “extensions” to an HTTP server (aka web server) The client part is usually executed by a web browser The HTTP protocol is used for communication between the client and the server

3 Introduction to ASP.NET3 Some web application frameworks Sun/Oracle Java Servlets + JSP PHP CGI (Common Gateway Interface) –Very old Ruby on Rails Microsoft ASP.NET Microsoft ASP –From before ASP.NET

4 Introduction to ASP.NET4 ASP.NET web applications ASP.NET is Microsoft’s way of making web application ASP.NET is programmed using a programming language –Usually VB.Net or C# The web server is usually Microsoft IIS –Internet Information Service

5 Introduction to ASP.NET5 ASP.NET ASP.NET is executed on the server side ASP.NET produces HTML, JavaScript,etc. to be shown / executed on the client side –By the browser

6 Introduction to ASP.NET6 Controls ASP.NET pages consists of –Pure HTML –Forms To accept user input –Code Usually written in VB.NET or C# –Controls Code + controls are executed on the server producing HTML, JavaScript, etc.

7 Introduction to ASP.NET7 Postback Forms –Accept user input –Data is sent back to the same ASP.NET page Using HTTP POST request Called postback Sometimes the ASP.NET pages wants to know if it’s executing a first request or postback

8 Introduction to ASP.NET8 Events Many ASP.NET controls sends events –Button has a ”button_click” event, etc. –Page has ”page_load” event, etc. –TextBox has ”textChanged” event Event handlers (methods) are usually placed in the codebehind file Event code are executed at the server –Events generate a HTTP request/response

9 Introduction to ASP.NET9 viewState HTTP is stateless ASP.NET keeps track of the state between postbacks –Hidden FORM field where the state of other FORM fields is kept –Encoded, but not encrypted –Decoded at the server side

10 Introduction to ASP.NET10 Code behind / beside ASP.NET pages are generally split into two parts –View HTML + controls –Code Often called “code behind” or “code beside” Event handlers Separation of concerns C# syntax: Partial class


Download ppt "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."

Similar presentations


Ads by Google