Insects live in a three-dimensional space, and need to be able to attach to different types of surfaces in a variety of environmental and behavioral contexts. Adult leaf beetles possess great attachment ability due to their hairy attachment pads. In contrast, their larvae depend on smooth pads to attach to the same host plant. We tested friction forces generated by larvae and adults of dock leaf beetles Gastrophysa viridula on different rough surfaces, and found that adults generate much higher attachment to various substrates than larvae, but are more susceptible to completely losing attachment ability on surfaces with "critical" roughness. Furthermore, sex-specific setal morphology has the effect that attachment forces of male adults are generally higher than those of females when adjusted for body weight. The results are discussed in the context of development, ecology, and changing behavioral strategies of successive life stages.