View Single Post
  #6 (permalink)  
Old November 16th, 2006, 05:52 PM
jam80920 jam80920 is offline
Registered User
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

The easiest thing I found was to put the default value in the InsertQuery parameters for the DataSource. It's not perfect, since it doesn't show the default value in the DetailsView.

The more correct way to do it is to make your field a Template Field and do the data binding there. I used this for several DropDownList style fields where I want to display a specific set of user friendly names, but I have an internal ID that needs to get stored in the database. The template field lets you bind to another DataSource and have the Text and Value feature of the DropDownList. Since my app is an internal administrative tool, I'm not going this far for fields that are just text fields.

Reply With Quote