Let X be a countable CW complex and Y an ANR (for metric spaces) and let Y X denote the space of continuous maps from X to Y with the compact-open topology. We show that, under mild restrictions, the following are equivalent: (1) Y X is an 2-manifold, (2) Y X is an ANR, (3) Y X has the homotopy type of a CW complex. We also give a few interesting examples and applications.