Sahih Bukhari Volume 002, Book 018, Hadith Number 150.
Narated By Abu Bakra : We were with Allah's Apostle when the sun eclipsed. Allah's Apostle stood up dragging his cloak till he entered the Mosque. He led us in a two-Rakat prayer till the sun (eclipse) had cleared. Then the Prophet (p.b.u.h) said, "The sun and the moon do not eclipse because of someone's death. So whenever you see these eclipses pray and invoke (Allah) till the eclipse is over."