data repeater question

S

Stephen

Hi,

I have a quick question. I am displaying all the orders that are active. I
am making use of a datarepeater with checkboxes to display data and a submit
button to insert into the database.

suppose i want to make the orders inactive using the checkboxes and click on
the submit button should update the database.

How do I capture the event such that only those check boxes that have been
checked are updated and not others?

Thanks,
Stephen.
 
C

Charles Chen

When you render the checkbox in the template, give them
all the same name but a different HTML value attribute.
This value attribute should be the ID that you want to
update/delete/add (whatever).

When you post back, if the checkboxes all have the same
name, the values will be concatenated into a single comma
delimited value. You can get this from the Request by
using the name of the checkboxes and then splitting on the
comma and looping through each value.

~Chuck
 

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,890
Messages
2,569,972
Members
46,307
Latest member
EthanPrevo

Latest Threads

Top