In this paper, a two-stage optimal charging scheme based on transactive control is proposed for the aggregator to manage day-ahead electricity procurement and real-time EV charging management in order to minimize its total operating cost. The day-ahead electricity procurement considers both the day-ahead energy cost and expected real-time operation cost. In the real-time charging management, the cost of employing the charging flexibility from the EV owners is explicitly modelled. The aggregator uses a transactive market to manage the real-time charging demand to provide the regulating power. A model predictive control (MPC) based method is proposed for the aggregator to clear the transactive market. The real-time charging decisions of the EVs are determined by the clearing of the proposed transactive market according to the real-time requests and preferences of the EV owners. As such, the aggregatorb's decisions in the real-time EV charging management and regulating power markets can be optimized. At the same time, the charging requirements and response preferences of the EV owners are respected. Case studies using real world driving data from the Danish National Travel Surveys were conducted to verify the proposed framework.