In dynamic optimization problems, the optimal input profiles are typically obtained using models that predict the system behavior. In practice, however, process models are often inaccurate, and on-line adaptation is required for appropriate prediction and re-optimization. In most dynamic real-time optimization schemes, the available measurements are used to update the plant model, with uncertainty being lumped into selected uncertain plant parameters; furthermore, a piecewise-constant parameterization is used for the input profiles. This paper argues that the knowledge of the necessary conditions of optimality (NCO) can help devise more efficient and more robust real-time optimization schemes. Ideally, the structuring decisions involve the NCO as follows: (i) one measures or estimates the plant NCO, (ii) a NCO-based input parameterization is used, and (iii) model adaptation is performed to meet the plant NCO. The benefit of using the NCO in dynamic real-time optimization is illustrated in simulation through the comparison of various schemes for solving a final-time optimal control problem in the presence of uncertainty.