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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top