List of checkboxes

Posted by Andrea Girardi on Stack Overflow See other posts from Stack Overflow or by Andrea Girardi
Published on 2011-01-10T15:00:27Z Indexed on 2011/01/10 17:53 UTC
Read the original article Hit count: 242

Filed under:
|

Hi all,

Happy New Year to all. I'm a newbie in VB.NET and ASP.NET. This is my problem:

I retrieve a list of records from DB and, for every row, I need to show 4 checkboxes. I can use a checkboxlist for every rows, but it's not so clear how I can process the results after the submit.

I've some object and some operations available for that object. From database I extract a list of object with all operations. For every operation I want to show a check box to enable or disable the operation. The result is something like that:

OBJ1 - url - [] [x] []

OBJ2 - url - [] [x] [x]

On url I've an href to another page created using the Id retrieved from DB. To create that I used this code:

<td class="column-filename">
    <strong>
        <asp:Label runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "GroupName")%>'></asp:Label>
    </strong>                    
</td>    
<td align="left">
    <span style="vertical-align:middle">
    <asp:CheckBoxList runat="server" ID="operations" RepeatDirection="Horizontal" RepeatLayout="Table">
        <asp:ListItem Text="View"></asp:ListItem>
        <asp:ListItem Text="Upload"></asp:ListItem>
        <asp:ListItem Text="Move"></asp:ListItem>
        <asp:ListItem Text="Delete"></asp:ListItem>
        <asp:ListItem Text="Rename"></asp:ListItem>
        <asp:ListItem Text="Replace"></asp:ListItem>
    </asp:CheckBoxList>
    </span>
</td>
</asp>
            </asp>

my problem is: how can I parse all checkboxes?

could you help me or send me a link or any other resources to solve my issue?

many thanks! Andrea

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about vb.net