I have a table named user(id,name) and access(id,name) and i want to display the contents of table access using checkboxlist in the view page.

After that i want to store the selected value in another table “user_access” containing userid and accessid (combination is unique) which contains all the selected id’s of the checkbox.

Can anyone help me how to do this.