In this paper, we consider a class of denial-of-service (DoS) attacks, which aims at overloading the communication channel. On top of the security issue, continuous or periodic transmission of information within feedback loop is necessary for the effective control and stabilization of the system. In addition, uncertainty - originating from variation of parameters or unmodeled system dynamics - plays a key role in the system's stability. To address these three critical factors, we solve the joint control and security problem for an uncertain discrete-time Networked Control System (NCS) subject to limited availability of the shared communication channel. An event-triggered-based control and communication strategy is adopted to reduce bandwidth consumption. To tackle the uncertainty in the system dynamics, a robust control law is derived using an optimal control approach based on a virtual nominal dynamics associated with a quadratic cost-functional. The conditions for closed-loop stability and aperiodic transmission rule of feedback information are derived using the discrete-time Input-to-State Stability theory. We show that the proposed control approach withstands a general class of DoS attacks, and the stability analysis rests upon the characteristics of the attack signal. The results are illustrated and validated numerically with a classical NCS batch reactor system. © 2019 IEEE.