checkbox and two variables

  • Thread starter microsoft.public.dotnet.languages.vb
  • Start date
M

microsoft.public.dotnet.languages.vb

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
 
A

Anthony Jones

microsoft.public.dotnet.languages.vb said:
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).
 
E

Evertjan.

Anthony Jones wrote on 05 aug 2006 in
microsoft.public.inetserver.asp.general:
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") %>'

??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top