What is the easiest way to display the contents of a database record on an ASP.net page using Visual Studio 2005?
The page merely needs to display the data as read-only text.
In the past I have used a series of labels which were populated using a datareader. The datareader was filled using the ExecuteReader method of a SqlCommand object.
This did the job perfectly well but the code was quite lengthy moving through each field in the datareader and writing to the appropriate label.
I was just wondering if there was a simpler way of doing what must be a very common task?
The page merely needs to display the data as read-only text.
In the past I have used a series of labels which were populated using a datareader. The datareader was filled using the ExecuteReader method of a SqlCommand object.
This did the job perfectly well but the code was quite lengthy moving through each field in the datareader and writing to the appropriate label.
I was just wondering if there was a simpler way of doing what must be a very common task?