Mahmud of Ghazni : The elder son-in-law of Sabuktagin, Mahmud of Ghazni assumed the throne in 997 AD. He was very conscious of the wealth he could achieve from further conquests into India. He was also a religious fanatic who aimed to spread Islam. Mahmud is said to have invaded India seventeen times between 1001 -1027 AD. King Jaipal and later his son Anandpal resisted Mahmud but were defeated. Between 1009 A.D and 1026 A.D he invaded Kangra, Thaneshwar, Kanauj, Mathura, Gwalior, Kashmir and Punjab. In 1025AD Mahmud invaded Somnath and looted its temple on the coast of Saurashtra or Kathiwar. Enormous treasure of the fortified temple was looted. His last invasion was in about 1027 AD. He died in 1030AD.
After this Mohammad- bin-sam (mohhammad gori) attacked india and aftre defeating prithvi raj III chauhan in battle of tarain in 1193 and after it defeating raja jaichand of kannauj. Mohhammad gori died in 1206 then his three slaves divide his territory in three parts..first and favourite slave yaldoj captured Ghori area(in afghanistan and iran), second slave qutub din aibak controlled indus and gangettic plains and third slave bakhtiyaar controlled bengal and assam region.
after this muslims control india upto 1857 when the last muslim mughal emperor bhadurshah jafar was exiled to rangoon by british east india company.