More Stupid Questions: CheckboxList

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default More Stupid Questions: CheckboxList

    I am using my checkboxlist as a display of true/false values, not to enter data. Is there
    some way to access in code which list items are selected?

    Example:
    <asp:checkboxlist
    id="cblist"
    runat="server"
    cellpadding="5"
    cellspacing="5"
    repeatcolumns="3"
    repeatdirection="horizontal"
    repeatlayout="table"
    textalign="right">

    <asp:listitem value="">Federal</asp:listitem>
    <asp:listitem value="">State</asp:listitem>
    <asp:listitem value="">Tribal</asp:listitem>

    </asp:checkboxlist>

    If the db record indicated that federal was true how can I in a routine select it? Or do I
    need to find a different method to display this data?

    --
    BethF, Anchorage, AK

    It's YOUR God.
    They are YOUR rules.
    YOU burn in hell.
    Child Guest

  2. Similar Questions and Discussions

    1. I must ask really hard, or really stupid questions.
      Last week I posted two questions, one on http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid...
    2. Extend CheckBoxList
      I'd write a UserControl that contains the CheckBoxList and the Textbox.... "MoeJoe" <anonymous@discussions.microsoft.com> wrote in message...
    3. CheckBoxList
      When I put a CheckBoxList on a web form and then populate it, it grows longer. The behavior I wold like would be more like the Windows Forms...
    4. How to prevent changes to CheckBoxList
      Hello. Can anyone tell me if there is ANY way to prevent the user changing the values in a checkboxlist. I just want to use it for information...
    5. checkboxlist control
      Why don't you keep one of the checkbox selected on load. -- Regards Khan Imran "buran" <buran@buran.com> wrote in message...
  3. #2

    Default Re: More Stupid Questions: CheckboxList

    "David Wier" <dwier@nospamASPNet101.com> wrote in
    news:OMnjwXeXDHA.2384@TK2MSFTNGP10.phx.gbl:
    > Check this out:
    > [url]http://aspnet101.com/aspnet101/aspnet/codesample.aspx?code=cblMultiple[/url]

    Thanks.


    --
    BethF, Anchorage, AK

    It's YOUR God.
    They are YOUR rules.
    YOU burn in hell.
    Child Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139