Laptop power cord causing hang up.

Hi All,
I encountered a problem with my laptop before wherein everytime I plug the power cord the
whole thing freezes. The screen, the keyboard and the mouse stop functioning. But using the
battery as the power supply the laptop is functioning well. Is the problem on the power cord?
Please help me find the root cause of the problem.
