Setting a checkbox based on a value in a DB

Discussion in 'ASP .Net' started by C, Aug 8, 2003.

  1. C

    C Guest

    Hi,

    Based on a flag in my database table I want to make a
    server side checkbox checked.

    How can I dynamically do this through code?

    Thanks,
    C
     
    C, Aug 8, 2003
    #1
    1. Advertising

  2. C

    alien2_51 Guest

    Not sure what your looking for.....
    If your using data binding with a datagrid...
    in a windows application this is automatic, you have to do nothing...
    in a web app you get "True" or "False" in the grid, you have to use a
    TemplateColumn in combination with ItemCreated event to set the checked
    proerty of the check box control to the value coming from the database.
    If your not using databinding
    what are you using......?
    datareader..?
    dataset..?
    datatable..?
    xml...?

    "C" <> wrote in message
    news:031701c35ddc$5984f5a0$...
    > Hi,
    >
    > Based on a flag in my database table I want to make a
    > server side checkbox checked.
    >
    > How can I dynamically do this through code?
    >
    > Thanks,
    > C
     
    alien2_51, Aug 8, 2003
    #2
    1. Advertising

  3. mycheckbox.Checked = true or false depending on the value you get form you
    database



    "C" <> wrote in message
    news:031701c35ddc$5984f5a0$...
    > Hi,
    >
    > Based on a flag in my database table I want to make a
    > server side checkbox checked.
    >
    > How can I dynamically do this through code?
    >
    > Thanks,
    > C
     
    MS News \(MS ILM\), Aug 8, 2003
    #3
    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. Martin
    Replies:
    2
    Views:
    4,286
    Martin
    Jul 20, 2004
  2. Moe Sizlak
    Replies:
    3
    Views:
    511
    Mike Smith
    Jul 20, 2004
  3. Imran Aziz

    checkbox value attribute in checkbox control ?

    Imran Aziz, Aug 6, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    239
    Imran Aziz
    Aug 8, 2005
  4. randy
    Replies:
    13
    Views:
    480
    Tad McClellan
    Nov 1, 2003
  5. Replies:
    3
    Views:
    141
Loading...

Share This Page