Know the event on postback

Know the event on postback

Hi

         I have a gridview with paging enabled. I am handling beforeunload from clientside wherein i am calling a code behind function. When i click on page number the page gets unloaded . Is there a way to know that page index was changed or something like that on postback and prevent that function call from client side.

Thanking you in advance.