There are many different ways of playing a solo, but if you know what key your in it makes it easier.
I once saw a improvisation video done by George Duke (a great piano player) and he said to construct a 'classic' sounding solo to follow these steps.
Lets say that you start your solo on the letter A and end on the letter D, in that you have A, B, C and D to work with.
the letter A may be a simple riff and after you play that a few times move to A1, a variation of A, then on to A2 which is a different variation on A.
After that it will need a change and so move to B which sounds different to A, then move to B1 which is a variation of B then move to C which might be somthing totaly different, e.g. A and B might be melodic so make C rythymic.
After C the solo might sound complete so move to D, where your solo ends.
This way means that you have developed your solo and kept it interesting and flowing.
The main thing to remember is that there is no wrong way to play a solo, but i Hope this helped:)
"You know, we do more than just sing and dance. We've got a brain, too."
Backstreet Boys