Hi Navin,

You can do this as follows

We will store the current page URL in a session variable (say CurrentPageURL) on a page. When moved to another page, we will get that variable value and store it in a second session variable (say PreviousPageURL) and update the CurrentPageURL session variable with a new page URL. The ASP.NET straightforward code implementation is as follows:

//ASP.NET/C# code
 if (Session["CurrentPageURL"] != null)
 {
        Session["PreviousPageURL"] = Session["CurrentPageURL"];
 }
 Session["CurrentPageURL"] = Request.Url;

On the client side, when the onbeforeunload event is fired, we will verify whether the JavaScript document.referrer value is the same as that of the session variable. If the value is the same, in other words the back button is clicked, then it will act accordingly.

function HandleBackFunctionality()
 {
        var previousPageURL = "<%= Session["PreviousPageURL"] %>";

        if (document.referrer == previousPageURL)
        {
                alert("Its a back button click...");
                //Specific code here...
        }
 }

-----------------------------------------------------------------------------------------
Please mark as answer if it solves your problem.

Thanks, 
Nilesh