Charge and Discharge of a Capacitor to Drive a Solenoid

I haven't tried using a capacitor yet. I want to use it as a short turn burst. However, I want to control when to charge it and when to discharge it. I definitely dont want to have any voltage drops.