views:

475

answers:

1

How do you use a DetailsView control in Asp.NET?

  1. How do you change the labels to something other than the database field name?
  2. How do you hide some of the fields from the user? (which you need to query for because they are the identity fields - row-id, which you dont want the user to see)?
+1  A: 

You will need to configure the setup of the controls, have a look at This DetailVIew example that shows how to set items as read only etc.

Mitchel Sellers
The problem I have is when a field is called "cl_name" and I would like the DetailsView to show it as "Client Name". This example does not show how that is done. (GridViews allow us to set the header names, but DetailsView doesnt seem to have that functionality)
Rajah