Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Browser back button issue
amit shukla
Jan 4 2016 11:16 PM
259
Reply
Hello Friends
i want to disable browser back button in mvc not in jquery ( i.e. if we click on browser back button then previous page is not open . i have used some jquey code and this code is work but first , it display the previous page after that show the current page like below
<script type="text/javascript" language="javascript">
function DisableBackButton() {
window.history.forward()
}
DisableBackButton();
window.onload = DisableBackButton;
window.onpageshow = function (evt) { if (evt.persisted) DisableBackButton() }
window.onunload = function () { void (0) }
</script>
).
if any one has answer of this please share as soon as possible.
Thanks
Amit Shukla
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to get or set the content into div in ASP.NET MVC
The item \xxx\yyy.cs“ was specified more than once