The batteries must be exactly alike in every aspect to do that. Most are not.
Wildcard, I believe that to be another of boatings "Old Boater's Tales". Read the following thread carefully if you wish. I think it refutes the belief that parallel batteries need to be "identical in every way" quite well. Don't you?
But I tried to charge them both at the same time with the switch set to both, and it didn't work.
drynoc, perhaps you could explain your wiring setup and problem in a little more detail. If your batteries are wired to the "Bat. 1" and "Bat.2" terminals on your selector switch, and the switch is in good working order, then setting the switch to both should effectively parallel the batteries.