CyberLab Training Division :
ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites. It allows you to use a full featured programming language such as C# or VB.NET to build web applications easily.
This tutorial covers all the basic elements of ASP.NET that a beginner would require to get started.
Audience
This tutorial has been prepared for the beginners to help them understand basic ASP.NET programming. After completing this tutorial you will find yourself at a moderate level of expertise in ASP.NET programming from where you can take yourself to next levels.
Prerequisites
Before proceeding with this tutorial, you should have a basic understanding of .NET programming language. As we are going to develop web-based applications using ASP.NET web application framework, it will be good if you have an understanding of other web technologies such as HTML, CSS, AJAX. etc
ASP.NET supports three different development models:
Web Pages, MVC (Model View Controller), and Web Forms.
For More Details.
Visit: http://www.cyberlabzone.com
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
15 asp.net session22
1. Developing Web Applications Using ASP.NET
In this session, you will learn to:
Describe a Web Part and the purpose of Web Parts
Describe the components of a Web Part page and identify
scenarios when Web Part pages are useful features of Web
applications
Describe the more advanced features of Web Parts, including
connections between Web Parts
Create Web Part pages
Create Web Parts
Objectives
2. Developing Web Applications Using ASP.NET
In an application that has been built using Web parts, a user
can rearrange the components on a page, remove
components from a page, or add components from a
catalog.
Web parts appear on the page as discrete sections with
their own distinct user interface and functionality.
A Web part can display data from various sources.
Each Web part has a set of verbs, which are actions that the
user can take.
Verbs appears as links or buttons on a Web part.
What is a Web Part?
3. Developing Web Applications Using ASP.NET
A page that is implemented by using Web parts allows
customization of the appearance and contents of the page
by allowing a user to:
Remove Web parts
Add Web parts from a catalog
Rearrange Web parts
Minimize Web parts
Change the appearance of Web parts
Web parts also enable users to personalize Web part
properties such as:
Region property of a Weather Report Web part.
Industry property of a Stock Quotes Web part.
Pages collection in a Web Traffic Web Part.
What is a Web Part? (Contd.)
4. Developing Web Applications Using ASP.NET
A user can add a new Web part to the page by using the
Web parts catalog.
The Web parts catalog displays a list of all available Web
parts that are not already on the page.
A user can select a Web part from the catalog to add it to
the display.
When a user removes a Web part from the page, it
reappears in the catalog.
What is a Web Part? (Contd.)
5. Developing Web Applications Using ASP.NET
The Web parts control set is extensive, but some controls
are essential.
A developer needs to be familiar with the following Web part
controls to create a basic Web part page:
WebPartManager
CatalogZone
EditorZone
WebPartZone
ConnectionsZone
GenericWebPart
CatalogPart
Connection
EditorPart
Web Part Controls
6. Developing Web Applications Using ASP.NET
Many of the advanced capabilities that Web parts provide
are enabled by the Web part pages on which the Web part
is placed and do not work on ordinary ASP.NET Web Form
pages.
Every Web part page contains one or more zones.
The purpose of a zone is to contain Web parts, to organize
them, and to provide elements of the user interface.
Each zone can be oriented horizontally or vertically.
Every Web part must include a WebPartManager object.
The WebPartManager object is an invisible object that
performs a number of essential tasks on the page, such as:
Tracking the Web parts on the page
Tracking the zones that contain Web parts
Tracking the order of Web parts in the zone
What is Web Part Page?
7. Developing Web Applications Using ASP.NET
A Microsoft ASP.NET Web Parts page can enter several
different display modes.
A display mode is a special state that applies to an entire
page, where certain user interface elements are visible and
enabled, while others are invisible and disabled.
Display mode enables users to perform certain tasks to
modify or personalize a page.
A page can be in only one display mode at a time.
The WebPartManager control contains the
implementations for the display modes, available in the Web
parts control set and manages all display mode operations
for a page.
Web Part Page Display Modes
8. Developing Web Applications Using ASP.NET
Display mode of a page can be changed programmatically
by using the DisplayMode property.
There are five standard display modes in Web Parts control
set:
Browse
Design
Edit
Catalog
Connect
All the display modes are derived from the
WebPartDisplayMode class.
Web Part Page Display Modes (Contd.)
9. Developing Web Applications Using ASP.NET
Web part connections provide a route to transmit and
receive information among Web parts, in case they need to
work together.
A Web part can be connected to another Web part by using
connection points.
When two Web parts are connected, one of them acts as a
data provider and the other acts as a data consumer.
A connection point is an instance of a
ConnectionPoint-derived class.
A connection point can be created by using:
ConnectionConsumerAtribute class
ConnectionProviderAttribute class
Connected Web Parts
10. Developing Web Applications Using ASP.NET
A custom connection point can be created by inheriting from
the ConnectionPoint class; or by inheriting from
ConnectionConsumerAtribute class or
ConnectionProviderAttribute class.
A control acting as either a consumer or a provider can have
multiple connection points.
Connections between controls in a Web Parts zone can be
of two types:
Static
Dynamic
Connected Web Parts (Contd.)
11. Developing Web Applications Using ASP.NET
When creating a connection:
A control acting as a data provider defines a communication
contract indicating the data it can provide.
Another control, acting as the consumer and with the
knowledge of the communication contract , retrieves the data.
Connections between controls in a Web parts zone use a
communication contract in the form of an interface.
Connected Web Parts (Contd.)
12. Developing Web Applications Using ASP.NET
Personalizing Connections:
When you enable Connection Display mode for a Web part
page, you enable users to customize and save the connections
according to their preference.
When a page is in the Connection Display mode:
The Connections Zone is displayed to the user.
A user can use the Connections Zone to join connection points and
route data from one Web part to another.
Connected Web Parts (Contd.)
13. Developing Web Applications Using ASP.NET
Transformers:
Data can be reformatted when it is passed between Web parts
by using a transformer.
Several transformers are included in ASP.NET 2.0 such as
System.Web.UI.WebControl.WebParts.
RowToFieldTransformer.
A custom transformer can be created by inheriting from the
WebPartTransformer class.
Connected Web Parts (Contd.)
14. Developing Web Applications Using ASP.NET
Problem Statement:
You are a developer in the Adventure Works organization, a
fictitious bicycle manufacturer. You have been asked to assist
in creating a new Business-to-Consumer (B2C) Web
application and a related Business-to-Employee (B2E) extranet
portal.
Decisions on the design of the application have already been
made. You have been asked to carry out a number of specific
tasks in order to implement various elements of this design. As
part of the B2C development, you have been asked to
prototype a Web Part Page for employees’ extranet portal.
Demo: Building Web Part Pages and Web Parts
15. Developing Web Applications Using ASP.NET
Solution:
To solve this problem, you need to perform following tasks:
1. Create a Web Part Page
a. Open the starter solution.
b. Manage roles for the employee portal
c. Start SQL Express
d. Add the employee portal Web page
e. Add Web Part framework controls and a layout to the employee portal
Web page
f. Add mode-switching capabilities to the portal page
Demo: Building Web Part Pages and Web Parts (Contd.)
16. Developing Web Applications Using ASP.NET
2. Create a Web Part
a. Add and develop a User Control.
b. Add and configure the User Control as a Web Part.
c. Test the portal.aspx page.
d. Test the Web Part Page personalization behavior.
Demo: Building Web Part Pages and Web Parts (Contd.)
17. Developing Web Applications Using ASP.NET
In this session, you learned that:
ASP.NET Web Parts give the developer a way to support
extensive personalization on a Web page by providing a
means for rearranging, adding, and removing the components
of the page at runtime.
Catalog contains a list of the Web Parts available, that can be
added to the display.
Web parts can be created to work together to present related
information or to provide richer user interface.
Web parts can be connected with each other by using
connection points.
Summary