Bob, The sample is a little involved (complex) but the jist of it is simply specifying an array of LayerIDs that you want to be visible. If you have a service with 20 sub layers and you want layer 2, 7, 10, 18 to be visible then you just provide and array of those layer ids to the ArcGISDynamicMapServiceLayer.visibleLayers property.ArcGISDynamicMapServiceLayer.visibleLayers = [2,7,10,18];