I am trying to divide the items between 3 columns evenly and leave the remainder in the 3rd column. However my code below keeps putting the last item back into the first column. If you want to see what's happening, go to www.medicouponmanager.com
and check out the bottom of the "select your health condition" section. The last item is put back into the first column for some reason. I want it to stay in the last.
My code is below. How can I fix this so that it ends up in the last column?
If isRoot Then
writer.Indent += 1
For Each item As MenuItem In items
intCounter += 1
If intCounter = Cint(items.Count/3) And intCounter >= Cint((items.Count/3)-1) then
writer.Write("</ul><ul class=""KartrisMenu hide_me"">")
intCounter = 0
writer.Indent -= 1