Combining the principles of dynamic inversion and optimization theory, a new approach is presented for stable control of a class of one-dimensional nonlinear distributed parameter systems with a finite number of actuators in the spatial domain. Unlike the existing \u27\u27approximate-then-design\u27\u27 and \u27\u27design-then-approximate\u27\u27 techniques, this approach does not use any approximation either of the system dynamics or of the resulting controller. The formulation has more practical significance because one can implement a set of discrete controllers with relative ease. To demonstrate the potential of the proposed technique, a real-life temperature control problem for a heat transfer application is solved through simulations. Numerical results are presented which show that the desired temperature profile can be achieved starting from any initial temperature profile