By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,611 Members | 1,642 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,611 IT Pros & Developers. It's quick & easy.

Refresh Page vs. Postback

P: n/a
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
---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi Coleen,

Can you try if this does something for you?

Response.Cache.SetExpires(DateTime.Now.AddTicks(50 0))

Cor
Nov 20 '05 #2

P: n/a
Are you checking for a postback?
"Coleen" <User@-NOSPAM-DotNetJunkies.com> wrote in message
news:uK*************@TK2MSFTNGP11.phx.gbl...
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
---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup

engine supports Post Alerts, Ratings, and Searching.
Nov 20 '05 #3

P: n/a
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 :-)

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Coleen,

Can you try if this does something for you?

Response.Cache.SetExpires(DateTime.Now.AddTicks(50 0))

Cor

Nov 20 '05 #4

P: n/a
whoops..misunderstood

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:ew**************@TK2MSFTNGP09.phx.gbl...
Are you checking for a postback?
"Coleen" <User@-NOSPAM-DotNetJunkies.com> wrote in message
news:uK*************@TK2MSFTNGP11.phx.gbl...
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
---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup

engine supports Post Alerts, Ratings, and Searching.

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.