Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to get text from CheckBox.Text property

Reply
Thread Tools

How to get text from CheckBox.Text property

 
 
neilr
Guest
Posts: n/a
 
      08-28-2008
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
 
Reply With Quote
 
 
 
 
neilr
Guest
Posts: n/a
 
      09-01-2008
On Aug 28, 9:29*am, neilr <(E-Mail Removed)> wrote:
> 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
 
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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
asp:Label - how can I get the Text property? Steve Hershoff ASP .Net Datagrid Control 1 11-06-2006 05:12 PM
asp:Label - how can I get the Text property? Steve Hershoff ASP .Net 1 11-06-2006 05:12 PM
DataBinder.Eval for an object's property property... like Eval(Container.DataItem,"Version.Major") Eric Newton ASP .Net 3 04-04-2005 10:11 PM



Advertisments