Adding a Action on a button press.

I have been trying a few methods But with no success so far.

You've done something, with some results. You've shared neither. If you want help, you need to be specific as to what the problem is.