In this paper, a sampled-data iterative learning control (ILC) approach is proposed for a class of nonlinear networked control systems. The motivation of this approach is to deal with control problems when the environment is periodic or repeatable over iterations in a fixed finite interval. In the networked control systems (NCS), because of the existence of time delays and packet losses in input and output signal transmissions, remote stabilization of linear systems is not an easy task. Moreover, to track a desired trajectory through a remote controller is even more difficult. By assuming a partial prior knowledge on the transmission time delays, we successfully incorporate previous cycle based learning (PCL) method into the network based control for a general nonlinear system which satisfies global Lipschitz condition. The convergence property of this approach is proved: the tracking error tends to be zero as the number of iteration increases. Furthermore, the convergence in the iteration domain can also be ensured when there exists packet loss in both transmission channels.