page load event not triggered

  • Thread starter samuelberthelot
  • Start date
S

samuelberthelot

Hi,
I'm struggling there.
My page load event is called the first time the page is loaded. Then I
move to another page using Response.Redirect, and when I click the back
button of the browser I get back to my formal page, but this time the
load event is NOT triggerred... Any idea why ??
 
M

Marina Levit [MVP]

You are seeing the browser's cached version of the page. There is no request
to the server here.
 
S

samuelberthelot

Thanks, indeed i've added:

<%
Response.Expires = -1
Response.AddHeader("cache-control", "private")
Response.AddHeader("pragma", "no-cache")
Response.CacheControl = "no-cache"
%>

and now it goes in the load event. But I'm not sure this is a good
idea as now I have to get all my data again and rebidn my datagrid as
everything was lost :(
what do you suggest ?
 
S

samuelberthelot

sorry i forgot to mention why everything was lost... this is because I
don't bind my datagrid again as the session variable that contains the
datasource is not nothing, therefore there's no need to get all the
data again. But apparentely i should rebind the grid, right ?
 
S

samuelberthelot

sorry i forgot to mention why everything was lost... this is because I
don't bind my datagrid again as the session variable that contains the
datasource is not nothing, therefore there's no need to get all the
data again. But apparentely i should rebind the grid, right ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top