Around 25 foreign nationals, including Sri Lankans and others, were detained in Tamil Nadu for allegedly voting illegally in recent elections.