How to get value of selected dynamic checkboxes in ASP.net?

frmsasp

Guppy
Hello there,

Currently I am working with the project which needs dynamically generated checkboxes and i have

generated dynamic checkboxes but i am facing problem with getting the value of selected checkboxes.

Problem is described below to understand easily, so please let me know if you come to know the

soln...

I am creating a form to assign rights to administrator of site for managing rights of different

modules from backend system. Please have a look at attached file to better understand the structure

of "admin rights" form which i have used.

Desciption:
There are four rights for each module and I want to set the rights will be allocated to selected

user based on the checked checkboxs. This data has to be send to database and that user will get

rights based on the rights given to him.
Plz tell me how (by which property or method) can I fetch the value of checkbox from this form.

Any help, advice or pointers on this matter would be highly appreciated.

Thanks,
Paresh
 

Attachments

  • checkbox image.jpg
    checkbox image.jpg
    10.9 KB · Views: 505
Paresh, the values from check boxes are either True (if ticked) or False (if empty). So, the value would be something like

Dim Mod1Add as Boolean

Mod1Add=cbAdd.checked

This will be either true or false

If reading from your database, then

Mod1Add=a true or false value from your db

cbAdd.checked=Mod1Add

Is this the sort of thing you were thinking of ?
 
Back
Top