How to get text from CheckBox.Text property

N

neilr

MSDN lists .text as a propoerty of the asp check obox but can anyone
help me to find out how to access it? We have a panel at the top of
our list forms that allows the user to select which columns to show
from an SQL stored procedure (via business level code). We have
succeeded in getting the names of the check boxes and using this to
select the columns - by using the same names for the checkboxes (with
chk stripped off the beginning of them) as for the database fields.
However, the field names in the SQL database are very obscure and we
would like to use the clearer names that we have in the check box text
label as the headings for the datagrid list - eg Company type instead
of CoTypeCodeName. However, we seem not to be able to get anything
from the .text property. Is there another way of getting the text from
the label that is associated wth a check box? Many thanks for any help
 
N

neilr

MSDN lists .text as a propoerty of the asp check obox but can anyone
help me to find out how to access it? We have a panel at the top of
our list forms that allows the user to select which columns to show
from an SQL stored procedure (via business level code). We have
succeeded in getting the names of the check boxes and using this to
select the columns - by using the same names for the checkboxes (with
chk stripped off the beginning of them) as for the database fields.
However, the field names in the SQL database are very obscure and we
would like to use the clearer names that we have in the check box text
label as the headings for the datagrid list - eg Company type instead
of CoTypeCodeName. However, we seem not to be able to get anything
from the .text property. Is there another way of getting the text from
the label that is associated wth a check box? Many thanks for any help

OK - no problem I found how to do this - - we had not specified
"mycontrol" as a checkbox - when we did , the checkbox.text property
worked - - stupid error on our part
 

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,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top