How to get text from CheckBox.Text property

Discussion in 'ASP .Net' started by neilr, Aug 28, 2008.

  1. neilr

    neilr Guest

    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
    neilr, Aug 28, 2008
    #1
    1. Advertising

  2. neilr

    neilr Guest

    On Aug 28, 9:29 am, neilr <> 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
    neilr, Sep 1, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    0
    Views:
    513
    tshad
    Apr 15, 2005
  2. Vikram

    disable checkbox list checkbox

    Vikram, Jan 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,385
    ThunderMusic
    Jan 25, 2006
  3. =?Utf-8?B?RG90TmV0RGV2?=

    DataGrid and embeded Checkbox..How to find if checkbox clicked

    =?Utf-8?B?RG90TmV0RGV2?=, Oct 6, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    809
    David Wier
    Oct 6, 2006
  4. Jason Huang
    Replies:
    0
    Views:
    546
    Jason Huang
    Jun 29, 2007
  5. Joey Pang
    Replies:
    4
    Views:
    510
    Joey Pang
    Jun 13, 2005
Loading...

Share This Page