checkbox to insert data

Discussion in 'ASP General' started by Mangler, Nov 1, 2006.

  1. Mangler

    Mangler Guest

    Quick question. Is it possible to insert values in a Database with a
    checkbox? Say I have a recordset and if the check box is checked I
    want to insert the value of the of the field in the DB.

    <%=rsqa.Fields.Item("recini").Value%>
    That is a persons initials, i want to insert those initials in a column
    if it is checked, if it isnt checked nothing is inserted..
     
    Mangler, Nov 1, 2006
    #1
    1. Advertising

  2. Yes it is possible, just use the If Statement
    example:

    if request("[THE NAME OF THE CHECK BOX]")="on" then
    rsqa.Fields.Item("recini")=[THE INTIALS, OR WHATEVER]
    end if


    hope this helps


    Best Regards
    Firas S Assaad


    Mangler wrote:
    > Quick question. Is it possible to insert values in a Database with a
    > checkbox? Say I have a recordset and if the check box is checked I
    > want to insert the value of the of the field in the DB.
    >
    > <%=rsqa.Fields.Item("recini").Value%>
    > That is a persons initials, i want to insert those initials in a column
    > if it is checked, if it isnt checked nothing is inserted..
     
    Firas S Assaad, Nov 2, 2006
    #2
    1. Advertising

  3. Mangler

    Mangler Guest

    Worked great, thanks.
     
    Mangler, Nov 2, 2006
    #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. tshad
    Replies:
    0
    Views:
    534
    tshad
    Apr 15, 2005
  2. Vikram

    disable checkbox list checkbox

    Vikram, Jan 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,407
    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:
    831
    David Wier
    Oct 6, 2006
  4. Jason Huang
    Replies:
    0
    Views:
    560
    Jason Huang
    Jun 29, 2007
  5. Joey Pang
    Replies:
    4
    Views:
    525
    Joey Pang
    Jun 13, 2005
Loading...

Share This Page