Two year old babies main problem is they pull cords of lamps and touch the hot stove and turn the gas. You cannot stop him by just saying No, at least not in the beginning. Even later, it depends on your tone of voice and how often you say it and whether you really mean it. It's not a method to rely on heavily until he has learned from experience what it means and that you mean it. Don't say "No" in a challenging voice from across the room. This given him a choice. Better to remove and distract him than to just say, No. Quickly give him a magazine, an empty box, anything that is safe and interesting. There's no use tossing him a rattle that he was bored with months ago.
Suppose he goes back to the same place again, remove him and distract him again, promptly, definitely, cheerfully. Say No at the same time that you remove him, adding it to your action for good measures. Sit down with him for a minute to show him what he can do with the new plaything.