0% found this document useful (0 votes)
2 views

ASP.NET

Uploaded by

nagusurushe1
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

ASP.NET

Uploaded by

nagusurushe1
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

ASP.

NET
It is a web framework designed and developed by Microsoft. It is used to
develop websites, web applications and web services. It provides fantastic
integration of HTML, CSS and JavaScript. It was first released in January
2002. It is built on the Common Language Runtime (CLR) and allows
programmers to write code using any supported .NET language.

ASP.NET is a part of Microsoft .NET Framework. The following image shows


the component stack.

(WPF = Windows Presentation Foundation, is an alternative technology to Windows Forms


(note, not a replacement). WCF = Windows Communication Foundation, is a technology for
communications between systems, including web services. WF = Workflow Foundation, is a
framework for integrating workflow into an application.)

ASP.NET Versions History


The following table shows the versions and features included in ASP.NET.
Date Version Features

January 16, 1.0 Object-oriented Web application development supportin


2002 inheritance, polymorphism and other standard OOP features

April 24, 1.1 Mobile controls and Automatic input validation.


2003

November 7, 2.0 New data controls (GridView, FormView, DetailsView


2005 New technique for declarative data access (SqlDataSource
ObjectDataSource, XmlDataSource controls
Navigation control
Master page
Login control
Themes
Skins
Web part
Personalization service
Full pre-compilatio
New localization techniqu
Support for 64-bit processor
Provider class model

November 3.0 Windows Presentation Foundation (WPF


21, 2006 Windows Workflow Foundation (WF
Windows Communication Foundation, which can use ASP.NE
to host service
Windows CardSpace, which uses ASP.NET for login roles

November 3.5 New data controls (ListView, DataPager


19, 2007 ASP.NET AJAX included as part of the framewor
Support for HTTP pipelining and syndication feeds
WCF support for RSS, JSON, POX and Partial Trus
All the .NET Framework 3.5 changes, like LINQ etc.

August 11, 3.5 Service Incorporation of ASP.NET Dynamic Dat


2008 Pack1 Support for controlling browser history in an ASP.NET AJAX
application
Ability to combine multiple JavaScript files into one file fo
more efficient downloadin
New namespaces System.Web.Abstractions an
System.Web.Routing

April 12, 4.0 The two new properties added in the Page class ar
2010 MetaKeyword and MetaDescription.
August 15, 4.5
2012

October 17, 4.5.1 Bootstrap 3.


2013 Web API 2: OAuth 2.0, OData improvements, COR
MVC 5: Attribute routing, authentication filters and filte
overrides
EF
SignalR
OWIN

May 5, 2014 4.5.2 Higher reliability HTTP header inspection and modificatio
methods
New way to schedule background asynchronous worker task

July 20, 4.6 HTTP/2 support when running on Windows 1


2015 More async task-returning APIs

ASP.NET provides three development styles for creating web applications:

1. Web Forms
2. ASP.NET MVC
3. ASP.NET Web Pages

Web Forms
It is an event driven development framework. It is used to develop
application with powerful data access. It provides server side controls and
events to create web application. It is part of the ASP.NET framework. We will
discuss it further in next chapters.

ASP.NET MVC
It gives us a MVC (Model View Controller), patterns-based way to build
dynamic websites. It enables a clean separation of concerns and that gives
you full control over markup for enjoyable, agile development. It also
provides many features that enable fast development for creating
outstanding applications. We will discuss it further in next chapters.
ASP.NET Web Pages
It is used to create dynamic web pages. It provides fast and lightweight way
to combine server code with HTML. It helps to add video, link to the social
sites. It also provides other features like you can create beautiful sites that
conform to the latest web standards.

All these are stable and well equipped frameworks. We can create web
applications with any of them. These are also based on the .NET Framework
and share core functionalities of .NET and ASP.NET.

We can use any development style to create application. The selection of


style is depends on the skills and experience of the programmer.

Although each framework is independent to other, we can combine and use


any of that at any level of our application. For example, to develop client
interaction module, we can use MVC and for data control, we can use Web
Forms.

The following table illustrates each development model.

Model Skills Development style Experience

Web Win Rapid development using a rich library of controls Mid-Level,


Forms Forms, that encapsulate HTML markup Advanced RAD
WPF, .NET

MVC Ruby on Full control over HTML markup, code and markup Mid-Level,
Rails, .NE separated, and easy to write tests. The best Advanced
T choice for mobile and single-page applications
(SPA).

Web Classic HTML markup and your code together in the same New, Mid
Pages ASP, PHP file Level

ASP.NET Page Lifecycle


In ASP.NET, a web page has execution lifecycle that includes various phases.
These phases include initialization, instantiation, restoring and maintaining
state etc. it is required to understand the page lifecycle so that we can put
custom code at any stage to perform our business logic.

Page Lifecycle stages


The following table contains the lifecycle stages of ASP.NET web page.

Stage Description

Page request This stage occurs before the lifecycle begins. When a page is requested by th
user, ASP.NET parses and compiles that page.

Start In this stage, page properties such as Request and response are set. It als
determines the Request type.

Initialization In this stage, each control's UniqueID property is set. Master page is applied t
the page.

Load During this phase, if page request is postback, control properties are loaded wit
information.

Postback In this stage, event handler is called if page request is postback. After that, th
event Validate method of all validator controls is called.
handling

Rendering Before rendering, view state is saved for the page and all controls. During th
rendering stage, the page calls the Render method for each control, providing
text writer that writes its output to the OutputStream object of the page'
Response property.

Unload At this stage the requested page has been fully rendered and is ready t
terminate.at this stage all properties are unloaded and cleanup is performed.

A requested page first loaded into the server memory after that processes
and sent to the bowser. At last it is unloaded from the server memory.
ASP.NET provides methods and events at each stage of the page lifecycle
that we can use in our application. In the following table, we are tabled
events.

ASP.NET Life Cycle Events


Page Event Typical Use

PreInit This event is raised after the start stage is complete and before th
initialization stage.

Init This event occurs after all controls have been initialized
We can use this event to read or initialize control properties.

InitComplete This event occurs at the end of the page's initialization stage
We can use this event to make changes to view state that we want to mak
sure are persisted after the next postback.

PreLoad This event is occurs before the post back data is loaded in the controls.

Load This event is raised for the page first time and then recursively for all chil
controls.

Control events This event is used to handle specific control events such as Button contro
Click event.

LoadComplete This event occurs at the end of the event-handling stage


We can use this event for tasks that require all other controls on the page b
loaded.

PreRender This event occurs after the page object has created all controls that ar
required in order to render the page.

PreRenderCompl This event occurs after each data bound control whose DataSourceID
ete property is set calls its DataBind method.

SaveStateCompl It is raised after view state and control state have been saved for the pag
ete and for all controls.

Render This is not an event; instead, at this stage of processing, the Page object call
this method on each control.
Unload This event raised for each control and then for the page.

You might also like