How to Loop the FormCollection using asp.net mvc
I need to Loop my FormCollection to get Id values from collection..
I have something like
collection[0]
collection[1]
collection[2]
colle开发者_JAVA技巧ction[3]
collection[4]
collection[5]
collectoin[6]
I have 7 or more keys I need to get second Index that means 1 3 5 7 9 11. something likethat.. I need to loop to get those values..
Can any body help me out.. using asp.net mvc..
thanks
for (int i = 1; i < collection.Count; i += 2)
{
var value = collection[i.ToString()];
// do whatever with value
}
精彩评论