Page_Load not getting fired when redirected to another page

My problem: My main page should always call Page_Load, because it retrieves the latest information given a certain time. Now, after my page has been loaded, i do some editting, and then i hit the update button: which in turn redirects me to a Success Page. I want to go back to the main page, but this time around, it does not go to Page_Load.

The solution: The cached data is persisting. What you need to do is to clear the cache on Page_Load

Response.Cache.SetCacheability(HttpCacheability.NoCache)

Reference: http://forums.asp.net/t/1317867.aspx/1

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s