"Page Can't be dispayed" page when "Browser" back button clicked !

Hi,

I am working on a bank application. If user tries to move back by using "Browser" i should get the below page message. Can you please let me know how can i achieve this by using sample code ?

Here is the information i should get in the page:

Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh button.



Thanks,
Kishore
kishore_peddiAsked:
Who is Participating?
 
tusharashahCommented:
Put following code in your Page_Load event, that will prevent page from caching:

Response.Cache.SetCacheability(HttpCacheability.NoCache)

other optional statements you can try are:
           Response.ExpiresAbsolute = DateTime.Now.Subtract(new TimeSpan(1, 0, 0, 0)) ;
           Response.Expires = 0 ;
           Response.CacheControl = "no-cache" ;

-tushar
0
 
kishore_peddiAuthor Commented:


Still not working ! Any help ?

Thanks,
Kishore
0
 
aki4uCommented:
solution provided
0
 
aki4uCommented:
any specific reason for not accepting my answer?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.