Why did he say "Asi ha'Tov b'Einayich"?
Malbim: Elkanah heard her vow only today 1 ; he said this to affirm it, that Shmuel will be to Hashem his entire life, from when she brings him to the Mishkan.
"Ki Amrah l'Ishah" (verse 22) implies that Elkanah thought to take Shmuel, i.e. Chanah had not yet told him. We need not say that this was when Elkanah prepared to ascend for the Regel. Amrah (past participle) connotes that she had told him earlier (he affirmed it that same day). (PF)
What is the meaning of "Yakem Hashem Es Davaro"?
Rashi: Eli told her with Ru'ach ha'Kodesh "vEi'lokei Yisrael Yiten Es Shelasecha" (verse 17), i.e. that the child will be Zera Anashim. [Radak - and to Hashem].
Rashi citing Midrash Shmuel 3:4: Every day, a Bas Kol (voice from Heaven) was saying that a Tzadik will be born and his name will be Shmuel. Everyone who gave birth to a boy would call him Shmuel 1 ; when they saw his deeds, they realized that the Bas Kol did not refer to him. 2 When Shmuel was born and they saw his deeds, it seemed that he was the Tzadik. 3
Malbim: In Chanah's Tefilah (Shirah) below, it is clear that she saw through prophecy that Shmuel will judge Yisrael and save them from their afflicters. Surely she told her husband 4 , therefore he said "Hashem should fulfill His word!"
Verse 21 gives a different reason why Chanah called him Shmuel! Perhaps it explains why she would pick that name even without a Bas Kol, and therefore the Bas Kol said that he will be named Shmuel. (PF)
I.e. the Bas Kol foretold that he will be an absolute Tzadik. All (i.e. most) Yisraelim are Tzadikim (Yeshayah 60:21)!
Also, presumably the Bas Kol that a Tzadik will be born ceased once Shmuel was born! (PF)
Aderes Eliyahu (15) says that Elkanah was a Navi. Perhaps she reasoned, 'if Hashem does not want to reveal it to him, how can I reveal it?' Yisrael reasoned like this (refer to Bereishis 37:33:3:1'! - PF)