Weighted complex dynamical networks with heterogeneous delays in both continuous-time and discrete-time domains are controlled by applying local feedback injections to a small fraction of network nodes. Some generic stability criteria ensuring delay-independent stability are derived for such controlled networks in terms of linear matrix inequalities (LMIs), which guarantee that by placing a small number of feedback controllers on some nodes the whole network can be pinned to some desired homogeneous states. In some particular cases, a single controller can achieve the control objective. It is found that stabilization of such pinned networks is completely determined by the dynamics of the individual uncoupled node, the overall coupling strength, the inner-coupling matrix, and the smallest eigenvalue of the coupling and control matrix. Numerical simulations of a weighted network composing of a 3-dimensional nonlinear system are finally given for illustration and verification.