' For testing
Function GetDataTable() As DataTable
' Create
sample data for the DataList control.
Dim dt As DataTable = New DataTable()
Dim dr As DataRow
Try
' Define
the columns of the table.
dt.Columns.Add(New DataColumn("tag", GetType(String)))
dt.Columns.Add(New DataColumn("class", GetType(String)))
'
Populate the table with sample values.
dr = dt.NewRow()
dr(0) = "p"
dr(1) = "paragraph"
dt.Rows.Add(dr)
dr = dt.NewRow()
dr(0) = "li"
dr(1) = "listItem"
dt.Rows.Add(dr)
dr = dt.NewRow()
dr(0) = "b"
dr(1) = "bold"
dt.Rows.Add(dr)
Return
dt
Catch
ex As Exception
Throw
ex
End Try
End Function
No comments:
Post a Comment