Recognizing the importance of incorporating different risk measures in the portfolio management model, this paper examines the dynamic mean-risk portfolio optimization problem using both variance and value at risk (VaR) as risk measures. By employing the martingale approach and integrating the quantile optimization technique, we provide a solution framework for this problem. We demonstrate that, under a general market setting, the optimal terminal wealth may exhibit different patterns. When the market parameters are deterministic, we derive the closed-form solution for this problem. Examples are provided to illustrate the solution procedure of our method and demonstrate the benefits of our dynamic portfolio model compared to its static counterpart.