tags:

views:

592

answers:

1
A: 

The question isn't particularly clear but from my understanding you wish to retrieve the values associated with the check boxes from the form collection and pass these values into th controller.

int[] checkboxIndecies=new int[] { /* checkbox indecies*/ }
bool[] checkboxValues=new bool[checkboxIndecies.Length];

for (int i=0; i < index_of_last_checkbox.Length; i++)
{
checkboxValues[i]=Convert.ToBoolean(FormsCollection[checkboxIndecies]);

}

That should get the value of each of the checkboxes from the forms collection, convert them to bool and place them im checkboxValues

Appolagises if this is unclear or just plain bad code, feel free to correct me

Crippledsmurf
I've updated question. please check it, and I don't want to pass formcolletion values into ohter controller. I just want to get it from the form only. The form is nothing but an Index view of model entity.
Vikas