Click here to Skip to main content
16,016,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
While click on back button in browser last page want to refresh. How can Possible in asp dot net C#.
Posted

1 solution

Found it :D

JavaScript
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.js"></script>
<script type="text/javascript">
onload=function(){
 var e=document.getElementById("refreshed");
 if(e.value=="no")e.value="yes";
 else{e.value="no";location.reload();}
}
</script>
</head>
<body>
<input type="hidden" id="refreshed" value="no">
</body>
</html>


I will be using this myself from now on :D
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900