It is usual for BP to go up whenever there is pain. You could check the BP when the pain has been relieved. Sometimes, the analgesics used to relieve the pain can also cause some salt and water retention and result in worsening of BP control.
Also, since you have been on a beta-blocker
for 10 years, it is also possible that the beta-receptors have increased in number and sensitivity to adrenergic stimuli. I would like to know the specific drug and the dosage that you are taking.
Importantly, you should not suddenly stop a beta blocker
if you are considering a change of drug. The dosage should be gradually tapered and overlapped with adequate dose of another drug.