using databind on InsertItem template field

  • Thread starter Thread starter Daves
  • Start date Start date
D

Daves

I have a FormView (2.0) with Item-, Insert- and Edit template. I'm viewing a
product so I have ID, Title and Description fields and also Category field.
When Inserting a new item all fields are empty but I need the Category field
to be set automatically since the user is browsing products under specific
category. Using databind this field isn't filled in though, how can I set
the control to do this?
 
There are Inserting and Inserted events you can handle from either the FormView
control or from the DataSource control. You should then be able to modify
those values as needed on the specific EventArgs (which will be different
if you're using SqlDataSource or ObjectDataSource).

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
Back
Top