I have an asp.net website that has a master page and multiple normal pages. There’s a menu bar on the master page that enables the user to select the normal page. I have code in the Page_Load event of one of the normal pages. Problem is, this event seems to trigger only once – the first time the user navigates to the page. If the user navigates to another page and then back again, the event doesn’t fire. Can anyone tell me what I’m doing wrong?
Share
It seems that problem was caused by the browser caching the page, thank you for pointing me in the right direction.
The problem appears not only when using the back button so I’m afraid guarding against this doesn’t solve the problem.
My solution has been to replace the simple html hyperlinks I used for the menu with server side asp.net button controls. When the code behind executes a response.redirect the page_load event of the target page seems to be executed each time.