checkbox and two variables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • microsoft.public.dotnet.languages.vb

    checkbox and two variables

    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("F ield1")%>'>

    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

  • Anthony Jones

    #2
    Re: checkbox and two variables


    "microsoft.publ ic.dotnet.langu ages.vb" <mamun_ah@hotma il.comwrote in
    message news:1154739548 .805528.211310@ h48g2000cwc.goo glegroups.com.. .
    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("F ield1")%>'>
    >
    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
    >

    Comment

    • Evertjan.

      #3
      Re: checkbox and two variables

      Anthony Jones wrote on 05 aug 2006 in
      microsoft.publi c.inetserver.as p.general:
      "microsoft.publ ic.dotnet.langu ages.vb" <mamun_ah@hotma il.comwrote in
      message news:1154739548 .805528.211310@ h48g2000cwc.goo glegroups.com.. .
      >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)

      Comment

      Working...