Bookstore Application: Middle Tier - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Bookstore Application: Middle Tier

Description:

Write the functionality for the middle tier, using Visual Basic code. ... Figure 31.8 | Creating a new data source. Creating a Databound ListBox using. an ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 30
Provided by: Pear179
Category:

less

Transcript and Presenter's Notes

Title: Bookstore Application: Middle Tier


1
31
  • Bookstore Application Middle Tier
  • Introducing Code-Behind Files and Databound Web
    controls

2
Outline
  • 31.1 Reviewing the Bookstore Application
  • 31.2 Programming the Books Pages Code-Behind
    File and Creating a Databound ListBox
  • 31.3 Coding the BookInformation Pages
    Code-Behind File and Creating a Databound
    DetailsView
  • 31.4 Internet and Web Resources
  • 31.5 Wrap-Up

3
Objectives
  • In this tutorial you will learn
  • Write the functionality for the middle tier,
    using Visual Basic code.
  • Modify code-behind files in a Web application.
  • Use databound Web controls.

4
Action/Control/Event (ACE) Table for
theWeb-Based Bookstore Application
Figure 31.1 ACE table for the Web-based
Bookstore application. (Part 1 of 2.)
5
Action/Control/Event (ACE) Table for
theWeb-Based Bookstore Application (Cont.)
Figure 31.1 ACE table for the Web-based
Bookstore application. (Part 2 of 2.)
6
Changing the Class Name in Books.aspx.vb
Figure 31.2 Code-behind files for the
Books.aspx and BookInformation.aspx pages in the
Solution Explorer.
7
Changing the Class Name in Books.aspx.vb (Cont.)
Figure 31.3 Code-behind file for the Books.aspx.
8
Changing the Class Name in Books.aspx.vb (Cont.)
Figure 31.4 Changing the applications class
name.
9
Changing the Class Name in Books.aspx.vb (Cont.)
Figure 31.5 Changing the Books.aspx Inherits
statement.
10
Defining the Click Event Handlerfor the
Books.aspx Page
Figure 31.6 informationButton_Click event
handler definition.
11
Creating a Databound ListBox usingan
ObjectDataSource
Figure 31.7 Creating a databound ListBox in the
GUI.
12
Creating a Databound ListBox usingan
ObjectDataSource (Cont.)
Figure 31.8 Creating a new data source.
13
Creating a Databound ListBox usingan
ObjectDataSource (Cont.)
Figure 31.9 Choosing a data source type.
14
Creating a Databound ListBox usingan
ObjectDataSource (Cont.)
Figure 31.10 Choosing a business object.
15
Creating a Databound ListBox usingan
ObjectDataSource (Cont.)
Figure 31.11 Defining data methods.
16
Creating a Databound ListBox usingan
ObjectDataSource (Cont.)
Figure 31.12 Finish defining Data Source for
ListBox.
17
Defining the Page_Load Event Handler forthe
BookInformation.aspx Page
Figure 31.13 BookInformation class.
18
Defining the Page_Load Event Handler for the
BookInformation.aspx Page (Cont.)
Figure 31.14 BookInformation class.
19
Defining the Page_Load Event Handler for the
BookInformation.aspx Page (Cont.)
Figure 31.15 Page_Load event handler modified
to set a parameter value and open a database
connection.
20
Defining the bookListButton_Click EventHandler
for the BookInformation Page
Figure 31.16 Definition of the
bookListButton_Click event handler.
21
Creating a Databound DetailsView Usingan
ObjectDataSource
Figure 31.17 Select ltNew Data Sourcegt in the
Choose Data Source TextBox.
22
Creating a Databound DetailsView Usingan
ObjectDataSource (Cont.)
Figure 31.18 Defining the data methods.
23
Creating a Databound DetailsView Usingan
ObjectDataSource (Cont.)
Figure 31.19 Defining the querys parameters.
24
Creating a Databound DetailsView Usingan
ObjectDataSource (Cont.)
Figure 31.20 Modifying the displayed fields in
the DetailsView.
25
Creating a Databound DetailsView Usingan
ObjectDataSource (Cont.)
Figure 31.21 Removing displayed fields from the
DetailsView.
26
Creating a Databound DetailsView Usingan
ObjectDataSource (Cont.)
Figure 31.22 Final Fields dialog.
27
Outline
Creating a Session item
Redirecting client browsers to BookInformation.asp
x page
28
Outline
(1 of 2 )
Create a ProductsTableAdapter object so that we
can call its methods to get the data
Get the data from the database
29
Outline
(2 of 2 )
Using a Session item to determine the row number
of the selected book.
Write a Comment
User Comments (0)
About PowerShow.com