DataSet
con = DBconnection.getconnection() ds = BLLFactory.coursebooks3().course() If ds.Tables(0).Rows.Count > 0 Then For j = 0 To ds.Tables(0).Rows.Count - 1 hfield = New HyperLinkField() hfield.HeaderText = ds.Tables(0).Rows(j)(1) hfield.NavigateUrl = "somepage.aspx" hfield.DataTextField = ds.Tables(0).Rows(j)(1).ToString() GridView1.Columns.Add(hfield) bfield1 = New BoundField() bfield1.HeaderText = ds.Tables(0).Rows(j)(1) bfield1.DataField = ds.Tables(0).Rows(j)(1).ToString() GridView1.Columns.Add(bfield1) 'GridView1.DataSource = ds.Tables(0) GridView1.DataBind() Next End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)