Refresh Page vs. Postback

  • Thread starter Thread starter Coleen
  • Start date Start date
C

Coleen

Hi All :-)

I have a web page that I need to refresh every time the page loads. I thought that the page automatically did a refresh/postback on the Page_Load event. Isn't refreshing the page the same thing as an Auto-postback? My page does not refresh with current data if you leave it, go to another page and return; but if you manually do a refresh of the page (using the Refresh button on the toolbar in IE), the page refreshes/reloads with the data from the other pages visited. How Do I get the page to refresh on load?

TIA

Coleen
 
Hi Coleen,

Can you try if this does something for you?

Response.Cache.SetExpires(DateTime.Now.AddTicks(500))

Cor
 
Are you checking for a postback?


Coleen said:
Hi All :-)

I have a web page that I need to refresh every time the page loads. I
thought that the page automatically did a refresh/postback on the Page_Load
event. Isn't refreshing the page the same thing as an Auto-postback? My
page does not refresh with current data if you leave it, go to another page
and return; but if you manually do a refresh of the page (using the Refresh
button on the toolbar in IE), the page refreshes/reloads with the data from
the other pages visited. How Do I get the page to refresh on load?
TIA

Coleen
engine supports Post Alerts, Ratings, and Searching.
 
That works, Thanks! :-)
Can you possibly tell me why it isn't working without that code? I can see
that the code you've given me sets the cache expiration to Now (and adds 500
ticks?) but since I am fairly new to .Net, I don't quite understand
what/why that works...

Thanks again Cor :-)
 
whoops..misunderstood

CJ Taylor said:
Are you checking for a postback?



thought that the page automatically did a refresh/postback on the Page_Load
event. Isn't refreshing the page the same thing as an Auto-postback? My
page does not refresh with current data if you leave it, go to another page
and return; but if you manually do a refresh of the page (using the Refresh
button on the toolbar in IE), the page refreshes/reloads with the data from
the other pages visited. How Do I get the page to refresh on load?
engine supports Post Alerts, Ratings, and Searching.
 
Back
Top