I have the same problem with Muggs. When he sees another dog on leash or in the care he goes absolutely ballistic. However, he is great with other dogs when he is off leash. Go figure! I finally found a great trainer and we are working on the problem.
First, relax. Dogs are very attuned to our body language, breathing and emotions. If you tense up when you see another dog, Cooter will automatically assume there is danger and go into protective mode. This is very hard to do; I thought I was relaxed but the trainer pointed out tiny little things I was doing that Muggs was picking up on. As for walking away, there are two schools of thought on that. Mark (our trainer) believes that walking away may reinforce the behaviour; the dog may interperet it as 'There is danger, we must get away.'
To work on the behaviour, choose something that your dog loves to play with - a woobie, squeeky toy, rope, etc. This is your 'Focus Toy'.
This is what Mark wrote out for me after our training session.
FOCUS TOY TRAINING
To teach your dog to focus on a toy you must withhold it more than give it. This creates desire for it and we can use that desire to shape his behaviour.
Once he is focused you may use it to distract him from other dogs, people or other stressful situations.
Remember
Choose a toy that you can throw, play tug with and is durable.
Remove all other toys, permantly, and only give bones when he is left alone.
The focus toy is never to be used by anyone else but the owner or to be given to the dog when he is alone.
The focus toy should only be used at times when you can follow the rules of the training routine.
TRAINING ROUTINE
Play in a distraction free area. This may be inside or outside.
Excite the dog with the toy by teasing him
Keep the toy away from him until he is very excited and then give a command (sit, down, etc.)
The second he completes the command he gets the toy. Let him play with it for about 30 seconds then take it back and immediately begin again.
Repeat with different commands until you feel the dog is showing signs that he is as excited as he can be about the game. Then suddenly tell him "done" and quit the game.
Put the toy up in an area that he can see it but not access it.
Repeat the game at least 3 times per day but not so often that he becomes bored with it.
Increase the commands he has to follow before the reward and decrease the amoun of teasing before rewarding as he gets used to the idea. Also break the game up by heeling or practicing some other exercise during the game.
This isn't an overnight cure, it will take some time. You may have to try different toys until you find the right one. I've only been doing this with Muggs for 10 days now, but he really loves the game. He's starting to sit and look at the toy then back at me. We use a stuffed duck with a squeeky inside. Another side benefit to the game - I used to have to chase him to get things off him, he would never 'release.' Now, he's starting to drop the duck when I tell him to, because he knows the game is going to start again.
I hope this helps. You may not ever be able to trust him at a dog park, but hopefully this will control his behaviour enough that you both can enjoy your walks and Cooter will get the exercise he needs.

