Made some changes to the master page cs file. Added the script manager and tried to run the javascript file with the button click code behind.