I'm creating a web application in VB.NET 2003 that connects to a SQL database... how do I display the data in separate controls (TextBoxes, labels, etc) instead of in a data grid?

Thanks,
Windows 3.11

my vb and my VS2003 are very rusty so there may be a better way than this.

You just get the record from the dataset/datatable and set the textbox.text or label.text = to the rows cell for the relevent data.

eg dim arow as datarow
textbox1.text = arow("firstname")
label1.text = arow("DOB")
etc and do the reverse to update the data.

You could always set the databinding on a text box and label and then put the textbox and labels datasource to the row and call databind on it too but i am rusty with VS2003 to know whether it is available in that or just 2005.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.