Jesus said to his disciples: “Ask and it will be given to you; seek and you will find; knock and the door will be opened to you. For everyone who asks, receives; and the one who seeks, finds; and to the one who knocks, the door will be opened. Which one of you would hand his son a stone when he asked for a loaf of bread, or a snake when he asked for a fish? If you then, who are wicked, know how to give good gifts to your children, how much more will your heavenly Father give good things to those who ask him.
“Do to others whatever you would have them do to you. This is the law and the prophets.”
When Jesus commanded not to give the holy thing to dogs, and not to cast pearls before swine, the hearer conscious of his own ignorance might say, "What do I have that is holy?" He therefore adds, "Ask, and you shall receive." Asking, that we may get health of soul to fulfill the things commanded us; seeking, pertains to the discovery of the truth. But when any has found the true way, he will then come into actual possession, which however is only opened to him that knocks. Therefore God hears sinners; for if He does not, the Publican said in vain, "Lord, be merciful to me a sinner" (Lk. 18:13); and by that confession was reconciled to God.
He who in faith offers supplication to God for the necessities of this life is only heard sometimes. For the physician knows better than the sick man what is good for his sickness. But if he asks that which God both promises and commands, his prayer shall be granted, for love shall receive what truth provides. But the Lord is good, who often does not give us what we wish, that He may give us what we should learn to prefer.
There is also perseverance, that we may receive what we ask for. In that God sometimes delays His gifts, He but recommends, and does not deny them. For that which is long looked for is sweeter when obtained; but that which comes at once is taken for granted. Ask then and seek righteous things. For by asking and seeking the eagerness in taking grows. God reserves for you those things which He is not willing to give you at once, that you may learn to desire great things. Therefore we ought to always pray and not to fail.