Upload
maud-gibbs
View
220
Download
1
Tags:
Embed Size (px)
Citation preview
Review
• ASP Server controls: Labels, Buttons, Textboxes
• HTML tables• Images and
Hyperlinks• Validator controls• DropDownList
• ViewState variables• Session variables• Session.Abandon()• page.IsPostBack
Preview
• CheckBox• RadioButton• ListBox• RadioButtonList• AccessDataSource• control.DataBind()• ds.Select()• DataView object
• dv.RowFilter• dv(i)• DataRowView object• drv(“name”)
control.Font properties
• Size
• Italic
• Bold
• Name
control.Font.Size
property with FontUnit value that defines the size of the control’s
Font
FontUnit(size)
constructor used to define size of font, where size is an Integer
control.Font.Italic
Boolean property indicating whether the control’s Font is Italic
control.Font.Bold
Boolean property indicating whether the control’s Font is Bold
control.Font.Name
String property specifying the name of the control’s Font family
control.AutoPostBack
Boolean property indicating whether the control will cause a
post back.
rbl.SelectedItem
property of type ListItem referring to the RadioButtonList item
selected by the user.
listitem.Textlistitem.Value
properties of the ListItem object
ListItem(“item”,value)
Constructs a ListItem object with the specified text and value
control.Items.Add(listitem)
Add method of the Items collection of the RadioButtonList adds the specified ListItem object
control.DataBind()
Copies values from data source to server control.
ds.Select()
Method of the AccessDataSource control that returns a DataView
object.
DataView
Represents a view of a data table in a data source. Also a collection
of DataRowView objects.
dv.RowFilter
Property of the DataView object (dv) used to filter rows. Similar to condition of the WHERE clause a
SQL Select statement.
DataRowView
An object type that represents a single row of data in a DataView
dv(i)
Refers to an individual element (a row) of the DataView object dv
drv(“name”)
Refers to an the value of a column in the DataRowView object, drv.
Data TableDataView, dv
DataRowView, drv
drv(“name”)
dv(0)
If Not IsPostBack Then
DataBind()
End If
Dim dv As DataView = CType(ds.Select(DataSourceSelectArguments.Empty), DataView)
dv.RowFilter = “ID = '" & ddlControl.SelectedValue & "'"
Dim drv As DataRowView = dv(0)
lblField1.Text = drv(“colname1”)
lblField2.Text = drv(“colname2”)
lblField3.Text = drv(“colname3”)