Hi everyone,

I'm having difficulty updating information within my database in regards to a checkboxlist.
I have a table which has attributes of DealerId and ProductId which reflects the products that a dealer is authorized to sell. The table looks as follows:

DealerId | ProductId
100        5
100        8
100        2
201        7
201        4          etc...

I have already populated the checkboxlist with product names and the productId's as the value of the checkbox respectively. My question is if I am working with the authorizations of let's say DealerId 100, how do I add or remove its associated productId's based on the checked/unchecked boxes in the checkboxlist? Thank you for your help.

A little more information and a code snippet would be useful here but based on what you've provided I would be inclined to recommend databind(). You didn't say what kind of database you're using but 'SELECT ProductId WHERE DealerId = '100'; should get it done.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.