Setting a checkbox based on a value in a DB

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Setting a checkbox based on a value in a DB

    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 Guest

  2. Similar Questions and Discussions

    1. Delete mulitple records from list based on checkbox?
      Hi - using ASP/ACCESS/VBscript Need an good and not expesive extension for making a page where I can delete multiple records from a list based on...
    2. Show Field based on Checkbox
      ASP/ACCESS I have a table that contains user data (e.g. username, password, email, etc.) along with some checkboxes that signify whether or not a...
    3. Setting cookie based on field being filled?
      I am trying to set a cookie based on if a user entered a email address on a form. I was thinking that either: <cfif #form.Email# NEQ null> or...
    4. Checking a checkbox based upon a table field
      I have a template column in my grid that displays a checkbox. I would like to have the box checked if a field in the table that the grid is based...
    5. Capturing checked event for Template based checkbox.
      Getting to grips with the datagrid better than I thought, however I've hit another problem which hopefully someone will be able to help (again.) ...
  3. #2

    Default Re: Setting a checkbox based on a value in a DB

    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" <c@nospam.com> wrote in message
    news:031701c35ddc$5984f5a0$a101280a@phx.gbl...
    > 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 Guest

  4. #3

    Default Re: Setting a checkbox based on a value in a DB

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



    "C" <c@nospam.com> wrote in message
    news:031701c35ddc$5984f5a0$a101280a@phx.gbl...
    > 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\) Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139