Until now you have not asked for anything in my name. Ask and you will receive, and your joy will be complete.
Up till now the disciples have asked Jesus directly for answers or they had prayed to God for things, but things are about to change, which is highlighted by the fact that Jesus uses a double negative for emphasis (you have asked ou oudeis = you have asked not nothing). Jesus exhorts them to “keep on asking” (present tense) and then they will receive (Matt 7:7-8).
Matthew 7:7-8 “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; he who seeks finds; and to him who knocks, the door will be opened.
The purpose of the asking and the receiving is for them to receive full and complete joy. Now, the joy given by God is unknown to the world (1 Cor 2:14), but it is so incredibly powerful that the Christian will experience it even in the face of afflictions and suffering (Acts 5:41, 2 Cor 6:10, 1 Peter 1:6, 8, 4:13). It is a fruit of the Spirit (Gal 5:22) and is permanent (Php 4:4). From this verse and (1 Thes 5:16-17) we can see that joy is closely related to prayer, but just how do they relate? Jesus was not speaking of asking for joy and yet joy was the result of asking and receiving that which we asked for. Why?
1 Corinthians 2:14 The man without the Spirit does not accept the things that come from the Spirit of God, for they are foolishness to him, and he cannot understand them, because they are spiritually discerned.
Acts 5:41 The apostles left the Sanhedrin, rejoicing because they had been counted worthy of suffering disgrace for the Name.
2 Corinthians 6:10 sorrowful, yet always rejoicing; poor, yet making many rich; having nothing, and yet possessing everything.
1 Peter 1:6 In this you greatly rejoice, though now for a little while you may have had to suffer grief in all kinds of trials.
1 Peter 1:8 Though you have not seen him, you love him; and even though you do not see him now, you believe in him and are filled with an inexpressible and glorious joy,
1 Peter 4:13 But rejoice that you participate in the sufferings of Christ, so that you may be overjoyed when his glory is revealed.
Galatians 5:22 But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness,
Philippians 4:4 Rejoice in the Lord always. I will say it again: Rejoice!
1 Thessalonians 5:16-7 Be joyful always; pray continually;
Perhaps the most important aspect of this verse is that God wants us to have complete joy. He is deeply interested in our wellbeing and happiness and will do all He can to secure them for us!