Hide the trash can. Also, redirection works better. I know it is very frustrated to see him doing the same thing but youcannot blame the baby for being curious. Try not to get upset. He mightnot understand/remember that you told him "no" for playing with thetrash can.
In my house, all the trash cans are either on the table or hidden within the childproof cabinet. Pretty pathetic :)