CIS 375Web App Dev II - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

CIS 375Web App Dev II

Description:

The Repeater control is used to display a repeated list of items that are ... artist Bob Dylan /artist country USA /country company Columbia /company ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 9
Provided by: raj11
Category:
Tags: 375web | cis | app | bob | dev | dylan

less

Transcript and Presenter's Notes

Title: CIS 375Web App Dev II


1
CIS 375Web App Dev II
  • ASP .NET 8
  • More Binding

2
The Repeater Control 1
  • The Repeater control is used to display a
    repeated list of items that are bound to the
    control.
  • The Repeater control may be bound to a database
    table, an XML file, or another list of items.
  • We will use cdcatalog.xml in our examples.
  • g
  • Empire Burlesque
  • Bob Dylan
  • USA
  • Columbia
  • 10.90
  • 1985

3
The Repeater Control 2
  • The code starts out by importing the
    ____________, using a DataSet object, associating
    it with the XML file, and binding when the page
    first loads
  • sub Page_Load
  • if Not Page.IsPostBack then
  • dim mycdcatalog New DataSet
  • mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))
  • cdcatalog.DataSource mycdcatalog
  • cdcatalog.DataBind()
  • end if
  • end sub

4
The Repeater Control 3
  • Then we create a Repeater control in an .aspx
    page.
  • The contents of the element are
    rendered first and only once within the output.
  • Then the contents of the element
    are repeated for each ________" in the DataSet
  • Last, the contents of the
    element are rendered once within the output.

5
The Repeater Control 4--Example

  • Title Artist
    Country Company Price
    Year

6
Alternating and Separating
  • You can add an element
    following the element to describe
    the ___________ of alternating rows. (Ex.)
  • The element can be used to
    describe a separator between each record. (Ex.)

7
The DataList Control
  • The DataList control, like the Repeater control,
    is used to display a repeated list of items that
    are bound to the control.
  • However, the DataList control adds a _______
    around the data items by default.
  • Instead of
  • We have
  • DataList Example

8
Using Styles
  • Creating styles for a DataList
  • cellpadding"2"
  • backcolor"e8e8e8"
  • width"100"
  • headerstyle-font-name"Verdana"
  • headerstyle-font-size"12pt"
  • headerstyle-horizontalalign"center"
  • itemstyle-backcolor"778899"
  • alternatingitemstyle-backcolor"e8e8e8"
  • footerstyle-font-size"9pt"
  • footerstyle-font-italic"true"
  • Styles Example
  • AlternatingItem Style Example
Write a Comment
User Comments (0)
About PowerShow.com