persising value from ItemTemplate into InsertTemplate and Insert query

D

Daves

(using 2.0) I have a page for viewing products and each product is assigned
to several categories.
On this page I have a FormView and an AccessDataSource. The ItemTemplate
shows the product details while InsertTemplate allows creating new product.
I thought the easiest way to persist the category value would be to put it
into a hidden field in the ItemTemplate (since the user doesn't need to see
it in the FormView) and then have it inserted along with the other input
fields using
InsertCommand="INSERT INTO [prProducts] ([Title], [Content], [Category]
VALUES (@Title, @Content, @original_Category)"

This should grab the Category databound value from the ItemTemplate and
parse it forward to the Insert query but it doesn't seem to work?
 

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

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top