ASP21052019
ASP21052019
Net
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.
1. Web Forms
2. ASP.NET MVC
3. ASP.NET Web Pages
Overview ASP.Net
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.
1. Web Forms
2. ASP.NET MVC
3. ASP.NET Web Pages
Overview ASP.Net
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.
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.
ASP.NET Page Lifecycle
Stage Description
Page request This stage occurs before the lifecycle begins. When a page is
requested by the user, ASP.NET parses and compiles that page.
Start In this stage, page properties such as Request and response are set.
It also determines the Request type.
Initialization In this stage, each control's UniqueID property is set. Master page is
applied to the page.
Load During this phase, if page request is postback, control properties are
loaded with information.
Postback event handling In this stage, event handler is called if page request is postback.
After that, the Validate method of all validator controls is called.
Rendering Before rendering, view state is saved for the page and all controls.
During the rendering stage, the page calls the Render method for
each control, providing a text writer that writes its output to the
OutputStream object of the page's Response property.
Unload At this stage the requested page has been fully rendered and is ready
to terminate.at this stage all properties are unloaded and cleanup is
performed.
ASP.NET Web Forms
Web Forms are web pages built on the ASP.NET Technology. It executes on the
server and generates output to the browser. It is compatible to any browser to
any language supported by .NET common language runtime. It is flexible and
allows us to create and add custom controls.
We can use Visual Studio to create ASP.NET Web Forms. It is an IDE (Integrated
Development Environment) that allows us to drag and drop server controls to
the web forms. It also allows us to set properties, events and methods for the
controls. To write business logic, we can choose any .NET language like: Visual
Basic or Visual C#.
Web Forms are made up of two components: the visual portion (the ASPX file),
and the code behind the form, which resides in a separate class file.
ASP.NET Web Forms
Server Controls
Control Name Applicable Events Description
Performance
We are using Visual studio 2017 to create web project. It includes the
following steps:
1.Creating a new project
Click on the file menu from the menu bar and select new -> project.
ASP.NET Web Forms Features
Debugging and Error Handling
We can diagnose problems that occur in our Web Forms application. Debugging and
error handling are well supported within ASP.NET Web Forms so that our
applications compile and run effectively.
We are using Visual studio 2017 to create web project. It includes the
following steps:
1.Creating a new project
Click on the file menu from the menu bar and select new -> project.
ASP.NET Web Forms Features
ASP.NET Web Forms Features
Select Project type
After adding form, we can see that this is now in our project as we have shown in the below
image.