473,405 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Refresh Page vs. Postback

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
4 2486
Hi Coleen,

Can you try if this does something for you?

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

Cor
Nov 20 '05 #2
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Andrew Alger | last post by:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button on Customer.aspx that when executed runs javascript code to open up parent_search as a popup. After the user searches...
10
by: tasmisr | last post by:
This is an old problem,, but I never had it so bad like this before,, the events are refiring when clicking the Browser refresh button. In the Submit button in my webform, I capture the server side...
1
by: francois | last post by:
I have a ASPX form with a dropdownlist that makes a post back (to the same page of course, just a normal asp.net postback) That page also has an auto refresh javascript as it needs to refresh its...
1
by: francois | last post by:
I have a ASPX form with a dropdownlist that makes a post back (to the same page of course, just a normal asp.net postback) That page also has an auto refresh javascript as it needs to refresh its...
4
by: John | last post by:
Hi - I've got a couple of pages where a DataList is populated only if(!Postback). I have buttons in the datagrid that allow for the 'deletion' of items from that DataList. The problem is that...
9
by: PK9 | last post by:
I'm having an issue with the "Refresh" of an asp.net page. The refresh is actually calling my last onClick event. I thought that asp.net was supposed to be stateless in that it shouldn't...
1
by: batista | last post by:
Hello, I have a web page, which is being refresh after every 30 secs.Now, there is also a datagrid in it, which i bind in the pageload event. Now the problem is when the page is refresh after...
1
by: Ibrahim. | last post by:
Hi, I have a login page, the problem I'm facing is like this; 1. Login page with submit button (being default button); 2. When first time the page is submitted then submit code is called. ...
4
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. If an ASP.NET page postsback, for example, after a button is clicked, and then I refresh the page (ie, by pressing F5 key), why does the same event occur when I press F5 as it did when I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.