Getting selected items in dynamically loaded checkbox list

J

Joel Reinford

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
 
C

Curt_C [MVP]

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top