Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,

I want to know the following operation coding.

When the checkbox checked how to get the corresponding textbox value in same row of the table.

I'm also placed the checkbox & textbox in the table.

The checkbox & textbox name in array.
<input type='checkbox' name='check[]'/>
<input type='text' name='item[]'/>


Thanks....:confused:
Posted
Updated 4-Feb-11 1:22am
v2
Comments
Manfred Rudolf Bihy 4-Feb-11 10:17am    
I'd say we need to see more code. Show at least the table construct with a couple of rows (3).
Manfred Rudolf Bihy 7-Feb-11 3:43am    
Ping!

1 solution

Not sure I understand what you have here but I think its an arrahof checkboxes and corresponding checkboxes.

you can try something in this format if only one check box can be checked

string mytext="";
for (int i = 0;i<=check.count;i++)
{
if (check[i].checked)
{
mytext=item[i].text;
}
}

or else use an if statement for each checkbox
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900