Do you have any additional details on what happened? Which A320 (base, FlyByWire, Fenix). Was the autopilot engaged and what were the active modes? Did the autopilot disengage? As @dxtr mentioned, V/S will work, assuming you can get the autopilot back in the loop. Also you could “pull” the altitude knob to do OP CLB (Open Climb), as it will pitch to maintain your profile climb speed. Hope these tips help but you might get additional feedback with more information.