Getting selected items in dynamically loaded checkbox list

Discussion in 'ASP .Net' started by Joel Reinford, Jan 13, 2004.

  1. I am loading a checkbox list on a web form at runtime along with several
    other controls. I am unable to get to the checkbox list on postback, I
    always get an invalid cast exception. I have no trouble getting the other
    controls including a dropdown list.

    Any suggestions on what I could do would be appreciated.

    Joel Reinford
    Joel Reinford, Jan 13, 2004
    #1
    1. Advertising

  2. Joel Reinford

    Curt_C [MVP] Guest

    please show how you are trying this.....
    It should just be
    string myVal = this.chkBoxName.SelectedItem.Value.ToString();


    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    www.Darkfalz.com


    "Joel Reinford" <> wrote in message
    news:...
    > I am loading a checkbox list on a web form at runtime along with several
    > other controls. I am unable to get to the checkbox list on postback, I
    > always get an invalid cast exception. I have no trouble getting the other
    > controls including a dropdown list.
    >
    > Any suggestions on what I could do would be appreciated.
    >
    > Joel Reinford
    >
    >
    Curt_C [MVP], Jan 13, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZWNvZGVy?=

    Copy checkbox selected datagrid items into new dataset

    =?Utf-8?B?ZWNvZGVy?=, Oct 10, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,311
    =?Utf-8?B?ZWNvZGVy?=
    Oct 14, 2005
  2. Bart Van Hemelen
    Replies:
    2
    Views:
    4,664
    Bart Van Hemelen
    Sep 4, 2006
  3. Iain
    Replies:
    3
    Views:
    926
  4. mldardy
    Replies:
    1
    Views:
    750
    mldardy
    Dec 10, 2008
  5. Bnob

    Datagrid selected items with checkbox

    Bnob, Aug 11, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    5
    Views:
    254
    Ken Cox [Microsoft MVP]
    Aug 13, 2004
Loading...

Share This Page