Try this:
I have a sqlDataSource which returns a single row and a single column (its looking up a user's name based on the authenticated name on for the page)
First, assign the results of the sqlDataSource to a dataview.
Then assign the first item (row) of the dataview to a datarowview.
Then assign the column (UserName in my case) to the text of your label.
Dim dv As DataView = CType(SqlDataSource1.Select(DataSourceSelectArgume nts.Empty), DataView)
Dim dr As DataRowView = dv.Item(0)
lblUserName.Text = dr.Item("UserName")
|