An introduction to ASP.NET web programming

bubblemessengerSecurity

Nov 5, 2013 (3 years and 8 months ago)

95 views

1

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 1

An introduction to ASP.NET web
programming

Objectives

Applied



Start a web application by entering its URL into your web browser.

Knowledge



Describe these terms: web application, web page, web form, client, server, HTTP,
HTML, HTTP request, HTTP r
esponse, postback, and round trip.



Name the software component that’s required on the client of any web application,
and name the two software components that are usually required on the server of any
web application.



Distinguish between static web pages a
nd dynamic web pages
.



E
xplain how
dynamic web pages are

processed by the web server.



Describe the four components of a URL, and describe what happens when you omit
the file name from a URL when you request a web page.



Explain why HTTP is called a
stateless

protocol
, and list the four features for
managing state that are provided by ASP.NET.



List the software components that you need on your own PC if you want to develop
and run ASP.NET web applications, including database applications.



Name the two main com
ponents of the .NET Framework and describe the purpose of
each.



Describe the three types of environments that can be used for developing ASP.NET
applications.



Describe the aspx files, code
-
behind files, and other classes that make up an
ASP.NET web applica
tion.



In general terms, describe the way that the files for an ASP.NET page are compiled
and run when the page is requested for the first time, and when the page receives
subsequent requests.

2

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 2

How to develop a one
-
page web
application

Objectives

A
pplied



Given the specifications for a web form, use the Web Forms Designer to design the
form.



Given the specifications for a one
-
page web application, use the Code Editor to write
the
C#

code for the web form.



Run and test the web applications that you de
velop.

Knowledge



Describe the way the files are organized in a file
-
system web site.



Explain what the target framework is for an ASP.NET
4

application.



Describe the uses of Visual Studio’s Web Forms Designer and Code Editor.



Describe the three different vi
ews of the Web Forms Designer.



Explain what a code snippet is and list three ways you can use them.



Distinguish between web server controls, HTML server controls, and validation
controls.



Describe the way controls are displayed when you use flow layout.



De
scribe the use of the AutoPostBack, CausesValidation, and EnableViewState
properties for a web server control.



Describe the use of the Load event for a web page.



Describe the use of the IsPostBack and IsValid properties for a web page.



Describe the use of
the Click, TextChanged, CheckedChanged, and
SelectedIndexChanged events for a web server control.



Describe how the HTML that’s sent to a browser handles view state and user input.

3

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 3

How to develop a multi
-
page web
application

Objectives

Applied



Giv
en the specifications for a multi
-
page web application that uses an Access data
source to get data, design, code, and test the application.



To transfer to another page within a web application, be able to use the Transfer
method, the Redirect method, or cr
oss
-
page posting.



To refer to pages or other files within an application, be able to use either absolute or
relative URLs.

Knowledge



Describe the contents of these special folders for ASP.NET applications: App_Code
and App_Data.



Describe two ways that you
can use an existing class with a new web application.



Describe the main folders and files that are added to a web site by default when you
use the ASP.NET Web Site template to start the web site.



In general terms, describe the procedure for renaming a web
form file as well as the
class that contains the code for the web form.



Distinguish between the Transfer method of the HttpServerUtility class, the Redirect
and RedirectPermanent
method
s

of the HttpResponse class, and cross
-
page posting.



Distinguish betwee
n absolute and relative URLs.



Describe an Access data source.



In general terms, explain how the AccessDataSource, DataView, and DataRowView
classes can be used to get data from a data source.



Describe how session state objects, session IDs, and cookies are

used to track the
state of each user of a web application.

4

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 4

How to test and debug an ASP.NET
application

Objectives

Applied



Test a file
-
system web site with the ASP.NET development server or IIS.



Create and test a

local

IIS web site.



Test a web s
ite using more than one browser.



Use the debugging techniques presented in this chapter to determine the cause of
runtime or logical errors in any of the applications you develop.

Knowledge



Explain how a file
-
system web site can be run under IIS.



Describe
how you can test your applications for concurrency errors.



Describe the conditions under which an
Exception Assistant dialog box

is displayed.



Distinguish between breakpoints and tracepoints.



Describe the differences between the three Step commands that yo
u can use to
control the execution of an application: Step Into, Step Over, and Step Out.



Describe the primary use of the Autos, Locals, and Watch windows.



Describe the use of the Trace feature of ASP.NET.



Describe the use of messages that are written dire
ctly to the HTTP output stream.

5

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 5

A crash course in HTML

and CSS

Objectives

Applied



Given the content and structure for a web page, code the HTML needed to implement
the page.



Use Design view to format an element or change an element’s margins or p
adding.



Given an external style sheet, apply its styles to the forms of an application.



Given the specifications for the styles used by an application, create an external style
sheet that defines those styles.



Use the Apply Styles
,

CSS Properties
, and Man
age Styles

windows to apply and
work with any of the styles that are available to a form.

Knowledge



Describe each of these terms as they relate to HTML documents: element, start tag,
content, end tag, self
-
closing tag, attribute.



Describe the use of the Co
deFile attribute in the Page directive for an HTML
document.



Distinguish between

a block element and an inline element.



Describe the use of these
block
elements:
div, h
1,
h
2,
h
3,
p
.



Describe the use of these inline elements: i, b,

br, span.



Describe three
ways

to include CSS in a web page.



Describe the two main advantages you get from using external style sheets.



Describe the basic parts of a CSS rule set.



Describe how you code CSS selectors for elements, IDs, and classes.

6

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 6

How to work with server
controls

Objectives

Applied



Given the specifications for a web form that uses any of the server controls presented
in this chapter, design and code the form.

Knowledge



Describe the normal coding technique for handling control events.



Describe the way ASP.N
ET provides for setting access keys for controls and for
setting the default focus and default button for forms.



Describe the differences between buttons, link buttons, and image buttons.



Describe the use of the e argument when working with an image button

control.



Describe the use of the Command event and the CommandName property of a button
control for processing a group of button controls.



Describe the differences between the way check box controls and radio button
controls work, including the difference

in when the CheckedChanged event occurs.



Explain how the items in any of the list controls are stored and how you refer to these
items in code.



Explain the purpose of the ListItem Collection Editor and describe when you might
use it.

7

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 7

How to use
the validation controls

Objectives

Applied



Given the data validation requirements for a web form, use any of the validation
controls presented in this chapter to implement that validation.



Create your own regular expression for use with a regular expressio
n validator.

Knowledge



Describe the use of each of the six validation controls provided by ASP.NET.



Describe the use of the ErrorMessage and Text properties of a validation control.



Explain how ASP.NET processes validation controls.



Describe two types of v
alidation that can be done by a required field validator.



Describe three types of validation that can be done by a compare validator.



Describe the use of validation groups.



Describe the use of the IsValid property of a page and the Validate method of a pag
e.



List two common uses for the regular expression validator.



Describe the use of a custom validator.

8

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 8

How to manage state

Objectives

Applied



Given the specifications for an application that requires any of the state management
techniques presente
d in this chapter, design and develop the application.



Use the web.config file to set session state options.



Use a cookie or a query string to pass information from one page to another.

Knowledge



Describe the uses of view state, session state, and applicat
ion state.



Explain how you enable view state for selected controls.



Describe the events that are typically used to retrieve and save session state items that
are used by two or more event handlers.



Describe the use of the Cookieless attribute for the sessi
on state element in the
web.config file.



Describe when an application begins and ends.



Explain how a project’s global.asax file is used with application state.



Describe the use of cookies.



Describe the use of query strings.

9

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 9

How to use master page
s

Objectives

Applied



Use a master page to provide the elements that are the same for a set of content
pages.



Use a parent master page to provide the elements that are the same for a set of
content pages and child master pages to provide the elements that a
re the same for
subsets of content pages in that set.

Knowledge



In general terms, describe the use of master pages, content pages, content
placeholders, master page events
, and nested master pages
.



In general terms, describe the way a content page uses (1)

Content element
s

and (2)
the MasterPageFile attribute of its Page directive.



Describe the procedure for converting a regular ASP.NET page to a content page.



In general terms, describe the procedure for accessing master page controls from a
content page.

10

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

C
hapter 10

How to use site navigation

Objectives

Applied



Use any of the site navigation features to make it easier for users to navigate through
the pages of a web site.

Knowledge



Describe the use of a SiteMapDataSource control and its related web.sitemap f
ile.



Describe the use of the TreeView, Menu, and SiteMapPath controls.

11

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 11

How to use themes

Because the goal of this book is to teach you the programming skills that you need for
developing web applications, not the design skills, the objectives th
at follow are minimal.
In general, they assume that you will only have to know how to apply themes, not
develop themes.

To further simplify, the objectives assume that you will only apply themes to an entire
application, so you don’t need to know how to ap
ply or remove themes and skins to or
from individual pages or controls. Beyond that, though, you should have a general
understanding of what themes can do, so the knowledge objective
s

ha
ve

that focus.

Objectives

Applied



Given the theme for an application,
apply it to a web site.

Knowledge



Describe the three components of a theme.



Describe the difference between when customization themes and style sheet themes
are applied.

12

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 12

An introduction to database
programming

Objectives

Knowledge



Explain how a
table in a relational database is organized.



Explain how the tables in a relational database are related.



Describe the use of these SQL statements: Select, Insert, Update, and Delete.



Describe the use of these ADO.NET components: data adapter, command,
con
nection, data reader, dataset, data table.



Describe concurrency, optimistic concurrency control, and “last in wins.”

13

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 13

How to use SQL data sources

Objectives

App
l
ied



Use a SQL data source to get the data that an application requires.



Use the Query

Builder to create the Select statement for a SQL data source.



Use a DataList control to present the data that’s retrieved by a SQL data source.



Use a list control such as a drop
-
down list to present the data that’s retrieved by a
SQL data source.



Create

a

SQL data source
that can be used
to update the data in a database.

Knowledge



Describe how a select parameter that gets its value from a control is defined.



Describe how you use the Eval and Bind methods within the templates of a DataList
control to bind t
he template controls to columns of a data source.



Describe the additional code that’s generated for a data source that can update the
database.



Explain when you might change the DataSourceMode attribute of a data source from
its default setting of DataSet
to DataReader.



Explain when you might want to store the data that’s retrieved by a data source in the
server’s cache memory.

14

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 14

How to use the GridView control

Objectives

Applied



Use a GridView control with bound fields to format and display the da
ta in a data
source.



Use a GridView control to update the data in a data source.



Use events raised by a GridView control to check for exceptions.



Use the SQL data source for a GridView control to insert a row into the database.



Use template fields and vali
dation controls with a GridView control.

Knowledge



Describe the basic functions that are provided by the GridView control.



Describe the difference between a bound field and a template field.



Explain what a command field is and how it’s used in a GridView c
ontrol.



Explain what the before
-
action and after
-
action events of a GridView control are
typically used for.



Describe how you can provide for adding rows to a GridView control.

15

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 15

How to use the DetailsView and
FormView controls

Objectives

Applied



Use a DetailsView control to display the data in a single row of a data source.



Use a DetailsView control to edit, delete, and insert rows in a data source.



Use templates to control the appearance of the fields in a DetailsView control.



Use a FormView cont
rol to display the data in a single row of a data

source
.



Use a FormView control to edit, delete, and insert rows in a data source.

Knowledge



Describe the three modes of the DetailsView control.



Describe the basic functions of the DetailsView and FormView
controls.



Explain what the before
-
action and after
-
action events of a DetailsView control are
typically used for.



Describe the templates that you can use to control the appearance of a DetailsView
control.



Describe how the DetailsView and FormView controls

differ.



Describe the templates that are generated for a FormView control.



Explain what a Master/Detail page is and how you develop one using a DetailsView
or FormView control.

16

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 16

How to use the ListView and DataPager
controls

Objectives

Applied



Us
e a ListView control to display
, format,
and sort
the data for the rows of
a data
source

in grid layout
.



Use a ListView control to display, format, and group the data for the rows of a data
source in column layout.



Use a ListView control to edit, delete, a
nd insert rows in a data source.



Use a DataPager control to

provide customized

paging for a ListView control.

Knowledge



In general terms, d
escribe the
use of these templates when you’re using a ListView
control: LayoutTemplate, ItemTemplate, AlternatingIte
mTemplate,
EditItemTemplate, InsertItemTemplate, SelectedItemTemplate, GroupTemplate, and
EmptyItemTemplate.



In general terms, describe the use of a DataPager control.



Explain what the before
-
action and after
-
action events of a
List
View control are
typical
ly used for.

17

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 1
7

How to use object data sources

Objectives

Applied



Use object data sources to develop 3
-
layer ASP.NET database applications.



Create a data access class that can be used with an object data source.



Use business objects with object dat
a sources.



Use paging with object data sources.

Knowledge



In general terms, describe
how 3
-
layer applications work in ASP.NET
.



Describe the two main benefits of using object data sources.



Explain what reflection is and how it’s used with object data source
s.



Describe the way business objects
are

used with object data sources.

18

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 1
8

How to secure a web site

Objectives

Applied



If you’re using IIS 5.1 or 6.0, r
equest and install a digital secure certificate or a trial
certificate.



If you’re using IIS 7, r
equest and install a digital secure certificate, or create a self
-
signed certificate and a binding for the HTTPS protocol.



Develop a web site that contains one or more secure pages.

Knowledge



In general terms, explain how secure connections work.



In genera
l terms, explain how digital secure certificates work.



Explain how the strength of a digital secure certificate affects its level of security.



Describe the difference between a single root certificate and a chained root
certificate.



Describe the functions
that are provided by IIS for working with digital certificates.

19

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter
19

How to authenticate
and authorize
users

Objectives

Applied



Use the Web Site Administration Tool to enable forms
-
based authentication and to
create and manage roles, users, and acces
s rules.



Use the Login, LoginStatus, and LoginName controls to provide the functionality
required for a web site that contains restricted pages.



Use the CreateUserWizard, PasswordRecovery, and ChangePassword controls to
allow users to create and manage the
ir own accounts.



Use the LoginView control to determine the message that’s displayed depending on
whether a user is logged in.

Knowledge



Describe how the three types of authentication work.



Describe the purpose of roles, users, and access rules.



Describe t
he basic purpose of the AspNetDb.mdf database.



Describe the basic procedure for modifying a data provider.

20

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 2
0

How to use email, custom error pages,
and back
-
button control

Objectives

Applied



Send email messages from your web applications including
messages with multiple
recipients, attachments, and HTML formatting.



Display custom error pages for any ASP.NET exceptions or HTTP errors that occur
while your web applications are running.



Prevent the back
-
button problem from occurring in your application
s.

Knowledge



Describe the use of MailMessage, MailAddress, Sm
t
pClient, and Attachment objects
as they relate to sending email messages from a web application.



Describe three ways to catch the exceptions that are thrown by your ASP.NET
applications.



Describ
e how you can use the web.config file to handle specific types of HTTP
errors.



Describe the “back
-
button problem.




Describe two ways to handle the back
-
button problem.

21

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 2
1

How to use AJAX

Objectives

Applied



Use the ASP.NET AJAX server controls to de
velop simple ASP.NET AJAX
applications.

Knowledge



Distinguish between a normal HTTP request and an AJAX HTTP request.



In general terms, describe the
ASP.NET

AJAX
client
-
side framework

and the
ASP.NET AJAX controls.



Describe the use of these ASP.NET AJAX co
ntrols: ScriptManager,
ScriptManagerProxy,
UpdatePanel, UpdateProgress, and Timer.



In general terms, describe how jQuery AJAX differs from ASP.NET AJAX.

22

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 2
2

How to configure and deploy
ASP.NET

application
s

Objectives

Applied



Use the Web Site Adminis
tration Tool and the IIS Management Console to configure
an ASP.NET application.



Deploy an application by using either the Copy Web Site command or the Publish
Web Site command.

Knowledge



Describe the three ways to deploy an ASP.NET application.



Describe t
wo advantages of precompiling a web site before deploying it.

23

bubblemessenger_e7f60436
-
7183
-
416d
-
91c7
-
04f742e36bd4.doc

Chapter 23

An introduction to WCF services

Objectives

Applied



Code and test simple WCF services.



Create a web site that hosts a WCF service library.



Use WCF services in your web applications.

Kn
owledge



In general terms, explain how WCF services work.



Describe the basic contents of the
IService1.
cs

and Service1.
cs

files that are included
by default in a WCF service library.



Describe the use of the following attributes: ServiceContract, OperationCo
ntract,
DataContract, and DataMember.