checkbox and two variables

Discussion in 'ASP General' started by microsoft.public.dotnet.languages.vb, Aug 5, 2006.

  1. Hi All,

    I need to assciate two varaibles dyanmically in value of the checkbox.
    How can I do that?

    For ex., I have the following:

    <td><input type='checkbox' name='chk<%=i%>' value='<%=rs("Field1")%>'>

    Above, I need to add second fields value from database in value
    property of the checkbox.

    I will highly appreciate your help.

    Thanks a million in advance.
    best regards,
    mamun
     
    microsoft.public.dotnet.languages.vb, Aug 5, 2006
    #1
    1. Advertising

  2. "microsoft.public.dotnet.languages.vb" <> wrote in
    message news:...
    > Hi All,
    >
    > I need to assciate two varaibles dyanmically in value of the checkbox.
    > How can I do that?
    >
    > For ex., I have the following:
    >
    > <td><input type='checkbox' name='chk<%=i%>' value='<%=rs("Field1")%>'>
    >
    > Above, I need to add second fields value from database in value
    > property of the checkbox.
    >


    It's not clear what you want. On the face of it you want the one check box
    to have two values. That doesn't make sense. Either the value of the check
    box is bound to Field1 or Field2 but it can represent both (unless there are
    always the same value in which case just show one and assing both when the
    form is posted).



    > I will highly appreciate your help.
    >
    > Thanks a million in advance.
    > best regards,
    > mamun
    >
     
    Anthony Jones, Aug 5, 2006
    #2
    1. Advertising

  3. microsoft.public.dotnet.languages.vb

    Evertjan. Guest

    Anthony Jones wrote on 05 aug 2006 in
    microsoft.public.inetserver.asp.general:

    > "microsoft.public.dotnet.languages.vb" <> wrote in
    > message news:...
    >> Hi All,
    >>
    >> I need to assciate two varaibles dyanmically in value of the
    >> checkbox. How can I do that?
    >>
    >> For ex., I have the following:
    >>
    >> <td><input type='checkbox' name='chk<%=i%>'
    >> value='<%=rs("Field1")%>'>
    >>
    >> Above, I need to add second fields value from database in value
    >> property of the checkbox.
    >>

    >
    > It's not clear what you want. On the face of it you want the one
    > check box to have two values. That doesn't make sense. Either the
    > value of the check box is bound to Field1 or Field2 but it can
    > represent both (unless there are always the same value in which case
    > just show one and assing both when the form is posted).


    value='<% = rs("Field1") & "-" & rs("Field2") %>'

    ??

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Aug 5, 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:
    531
    tshad
    Apr 15, 2005
  2. =?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
  3. GenxLogic
    Replies:
    3
    Views:
    1,289
    andrewmcdonagh
    Dec 6, 2006
  4. Jason Huang
    Replies:
    0
    Views:
    558
    Jason Huang
    Jun 29, 2007
  5. Replies:
    9
    Views:
    959
Loading...

Share This Page