Two problems with the dishwasher thing--
1) Soaps are by nature ionic, that's how they clean, and most use salts for buffering. Both of those things are very corrosive to electronics, and so any soap residue that may be lingering in your dishwasher will find spots to collect in on your electronic equipment.
2) Water is an insidious beast which will hide in the smallest nooks and crannies, and may not evaporate completely away for a long time.
So, if you have a dishwasher that is completely soap-free, and the water it is fed is naturally soft (water softeners use salt!) or plain distilled, and if the part is thoroughly dried out (blown out with pressurized air, then dried in some form is desiccant; rice would work if you keep it there a week or so), then I'd say, yes, clean it that way.
otherwise, do it the old-fashioned way-- take it apart and clean it by hand.