How to change the function of the hold button that is on the side of my iphone 4?

Currently the function of this button (located on the side of the phone on top of the volume buttons) is to change the volume of my phone from ringer to silent. How do i change this function in order to have that button used for locking the screen rotation?

Go to 'Settings', then 'General', then scroll down to 'USE SIDE SWITCH TO' and then you can change your choice.