using databind on InsertItem template field

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?
 
B

Brock Allen

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).
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top