Devavrata or Gangaputra, was taken to different sages by his mother Ganga, for the purpose of gaining knowledge.
Parashurama, the 6th avatar of Lord Vishnu, the son of Sage Jamadagni, the guru of Devavrata and also of Dronacharya. Devavrata learnt the skills in warfare from Parashurama, Sage Vashishta taught him about the vedas and Lord Indra, the King of the Devas, gifted Devavrata celestial weapons. He was skilful and had immense knowledge.
Once while talking a stroll, Shantanu saw that the flow of the river was shallow while looking for the reason he noticed that a young boy had built a dam with arrows using his celestial weapons. Shantanu did not recognise him as his son, but Devavrata recognised him. Soon, he used his power of illusion and disappeared, leaving Shantanu in a confusion, if it was his son or not.
Shantanu called out to Ganga, and she appeared in front of him, and when asked if the young boy was his son, she revealed to him that Devavrata was their son, and was a disciple of great sages. Hearing this Shantanu was pleased to be blessed with a son who had gained great knowledge.
Since Devavrata was given to Shantanu by Ganga he is also known as Gangadatta.
