CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    9

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

    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
    Attached Images Attached Images

  2. #2
    Join Date
    Oct 2005
    Location
    India
    Posts
    24

    Lightbulb Re: How to get value of selected checkboxes in ASP.net?

    HI,

    Just keep a variable "i" or something and initialize it.When you are dynamically adding the controls add this i value with the name.Then increment the i value.

    For retrieving request("controlname" & i).

    The above statement has to be put in a loop to increment the i values.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured