Stabilization of solutions to nonlinear Schr"odinger equations