Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Getting selected items in dynamically loaded checkbox list

Reply
Thread Tools

Getting selected items in dynamically loaded checkbox list

 
 
Joel Reinford
Guest
Posts: n/a
 
      01-13-2004
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


 
Reply With Quote
 
 
 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      01-13-2004
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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help selecting items from a list box trigger by what selected in dropdown list mldardy ASP .Net 1 12-10-2008 02:24 AM
DropDownList 2 always returns Selected = 0 for all items - even selected item Iain ASP .Net 3 12-11-2006 11:07 AM
Looping through CheckBoxList items doesn't pick up selected ones when items were disabled Bart Van Hemelen ASP .Net 2 09-04-2006 08:35 AM
Copy checkbox selected datagrid items into new dataset =?Utf-8?B?ZWNvZGVy?= ASP .Net 2 10-14-2005 04:27 AM
Datagrid selected items with checkbox Bnob ASP .Net Datagrid Control 5 08-13-2004 01:03 AM



Advertisments
 



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