In this paper, the problem of controller design for networked control systems with time-varying sampling rates and time delays is investigated. By using a memory at the feedback loop, a digital robust controller that minimizes an upper bound to the Hinfin performance of the closed loop system is determined. The design conditions are obtained from the Finsler's Lemma combined with the Lyapunov theory and expressed in terms of bilinear matrix inequalities. Extra variables introduced by the Finsler's Lemma are explored in order to provide a better system behavior. The time-varying uncertainties are modelled using polytopic domains. The controller is obtained by the solution of an optimization problem formulated only in terms of the vertices of the polytope, avoiding grids in the parametric space. Numerical examples illustrate the efficiency of the proposed approach.