Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I want to check whether the client has clicked back button or next button of browser using c# code only. Is their any way to implement it.

Thax
Posted

1 solution

There is no direct way.

You can check combined client and server effort[^]
 
Share this answer
 
Comments
avishek11 6-Oct-14 2:56am    
this is fine...
But if i want to check session value at back button click then what should i do in c#.....
thax
Sinisa Hajnal 6-Oct-14 3:46am    
May I ask WHY do you need that? It is bad practice to prevent the user from going back or refreshing the page. If it is simply to prevent users from submitting same data, it is better to check the data or to redirect them or remove submitting page from the history...and in all cases, give the users meaningful message instead of preventing default behaviour of the browser.

I'm not sure what you're asking me...if you want to check session value, there is an example code in the link I posted. What is the problem?

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