In this paper, we address the problem of controlling a system over an unreliable connection that is affected by time-varying delays and randomly occurring packet losses. A novel sequence-based approach is proposed that extends a given controller designed without consideration of the network-induced disturbances. Its key idea is to model the unknown future control inputs by random variables, the so-called virtual control inputs, which are characterized by discrete probability density functions. Subject to this probabilistic description, the actual sequence of future control inputs is determined and transmitted to the actuator. The high performance of the proposed approach is demonstrated by means of Monte Carlo simulation runs with an inverted pendulum on a cart and by a detailed comparison to standard NCS approaches.