473,396 Members | 1,816 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,396 software developers and data experts.

Postback is TRUE on refresh?!


For debugging purposes, I have the following in Page_load:
Response.Write("postback is " + IsPostBack.ToString + Now.ToLongTimeString)
i

When I view my page in IE, if I hit F5 (refresh), it tells me (as expected)
that IsPostback is False.

If I then hit a submit button on the page it tells me (as expected) that
IsPostBack is true.

However, if I then hit F5 again, it tells me that IsPostBack is TRUE! How
come? (I know that its going back to the server (on not client cache)
because the displayed time changes).

Thanks,

Paul.
Nov 18 '05 #1
4 3059
F5 repeats the last HTTP request.
If it was a GET it issues a GET, if it was a POST it issues a POST
(PostBack)...

Patrice

--

"Paul W" <qq*@qqq.com> a écrit dans le message de
news:uc***************@TK2MSFTNGP11.phx.gbl...

For debugging purposes, I have the following in Page_load:
Response.Write("postback is " + IsPostBack.ToString + Now.ToLongTimeString) i

When I view my page in IE, if I hit F5 (refresh), it tells me (as expected) that IsPostback is False.

If I then hit a submit button on the page it tells me (as expected) that
IsPostBack is true.

However, if I then hit F5 again, it tells me that IsPostBack is TRUE! How
come? (I know that its going back to the server (on not client cache)
because the displayed time changes).

Thanks,

Paul.

Nov 18 '05 #2
On Fri, 1 Oct 2004 10:04:22 -0400, "Paul W" <qq*@qqq.com> wrote:

For debugging purposes, I have the following in Page_load:
Response.Write("postback is " + IsPostBack.ToString + Now.ToLongTimeString)
i

When I view my page in IE, if I hit F5 (refresh), it tells me (as expected)
that IsPostback is False.

If I then hit a submit button on the page it tells me (as expected) that
IsPostBack is true.

However, if I then hit F5 again, it tells me that IsPostBack is TRUE! How
come? (I know that its going back to the server (on not client cache)
because the displayed time changes).

Thanks,

Paul.


Because you are technically posting the form again with that refresh.
Does the browser not ask you if you want to resubmit the data?

--
Thanks,
Chris Simmons
ne***************@netchris.com
Nov 18 '05 #3
Yes, the browser DOES ask me if I want to resubmit the data. Does this mean
that it SHOULD be received as a PostBack or should NOT.

Thanks,

Paul.

"Chris Simmons" <ne***************@netchris.com> wrote in message
news:ch********************************@4ax.com...
On Fri, 1 Oct 2004 10:04:22 -0400, "Paul W" <qq*@qqq.com> wrote:

For debugging purposes, I have the following in Page_load:
Response.Write("postback is " + IsPostBack.ToString +
Now.ToLongTimeString)
i

When I view my page in IE, if I hit F5 (refresh), it tells me (as
expected)
that IsPostback is False.

If I then hit a submit button on the page it tells me (as expected) that
IsPostBack is true.

However, if I then hit F5 again, it tells me that IsPostBack is TRUE! How
come? (I know that its going back to the server (on not client cache)
because the displayed time changes).

Thanks,

Paul.


Because you are technically posting the form again with that refresh.
Does the browser not ask you if you want to resubmit the data?

--
Thanks,
Chris Simmons
ne***************@netchris.com

Nov 18 '05 #4
On Fri, 1 Oct 2004 14:23:54 -0400, "Paul W" <qq*@qqq.com> wrote:
Yes, the browser DOES ask me if I want to resubmit the data. Does this mean
that it SHOULD be received as a PostBack or should NOT.

Thanks,

Paul.

"Chris Simmons" <ne***************@netchris.com> wrote in message
news:ch********************************@4ax.com.. .
On Fri, 1 Oct 2004 10:04:22 -0400, "Paul W" <qq*@qqq.com> wrote:

For debugging purposes, I have the following in Page_load:
Response.Write("postback is " + IsPostBack.ToString +
Now.ToLongTimeString)
i

When I view my page in IE, if I hit F5 (refresh), it tells me (as
expected)
that IsPostback is False.

If I then hit a submit button on the page it tells me (as expected) that
IsPostBack is true.

However, if I then hit F5 again, it tells me that IsPostBack is TRUE! How
come? (I know that its going back to the server (on not client cache)
because the displayed time changes).

Thanks,

Paul.


Because you are technically posting the form again with that refresh.
Does the browser not ask you if you want to resubmit the data?

--
Thanks,
Chris Simmons
ne***************@netchris.com


Paul, sorry for the delay here. That request from the browser is it
asking you if you want to re-post the data. So yes, you are reposting
("posting back") and the behavior you are seeing is to be expected.

--
Thanks,
Chris Simmons
ne***************@netchris.com
Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Matt | last post by:
I always see the term "postback" from ASP book, but I am not sure if I fully understand the meaning. Here's my understanding so far, please correct me if any mistakes. Here's a typical html...
2
by: Earl Teigrob | last post by:
I have run into a situation where I need to run the !IsPostBack code under one circumstance, even if it is a postback. Something that may complicate matters more is that this is a double postback...
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...
3
by: Tim::.. | last post by:
Can someone please tell my why I get the following problem when I type the following piece of code! How do I get around this??? The idea is that when a user clicks a button on a form it causes...
4
by: DEWright_CA | last post by:
I need to be able to from C# launch a postback. I have a command button that launches a function, I also have a javascript function that then keeps you from firing any other objects on the page,...
3
by: Simon Strandgaard | last post by:
Hi group, my setup: I have a GridView that extracts data from my table (a SqlDataSource). For each row, I have an 'edit' button and a 'delete' button. The 'edit' button opens a popup, through...
4
by: Dan | last post by:
Hi, i'm not sure to understand the difference between refreshing the pagina by clicking on 'refresh' in the browser and a postback. What i think it is: Suppose a page with a form containing a...
1
by: Matthew Wells | last post by:
Hello. I'm trying to use an asp - not html - button without having a postback or a screen refresh. I've tried turning off "CausesValidation" and "UseSubmitBehavior" and I still get a screen...
4
by: Peter | last post by:
ASP.NET I have an application which use ASP.NET Autocomplete extender which works great. But I have a question how to update all the fields on the screen using Ajax. Users starts typing in a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.