Checkboxlist

G

Guest

I have a checkboxlist that is populated from a small table consisting of 9
rows numbered 1 through 9 and a description for each in the second col. The
description is what appears on the interface.

I am trying to get the value of Col1 for each of the items checked (i.e., 1,
2, 3, 4, etc) instead of the description.

I have the following code that returns the description:
--
Dim li as ListItem
For Each li in cblTable.Items
If li.Selected Then
Response.Write(li.Text & " is selected.<br>")
End If
 
G

Guest

Hi, Tu-Thach!

One would only assume that would be the case, however, when I use "value" I
get the string value returned, or in other words, col2 of my table. I need
the ID number.

Try it -- I thought that would be the case too!

Sandy
 
G

Guest

Sandy,

Did you make sure the DataTextField and DataValueField map to the right
columns?
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top