IspostBack question

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

Hi guys,

I am entering some texts on textarea(HTML control)
on codebehind, I have IsPostBack on page_load function.
So first time IsPostBack is equal to TRUE when I submit the form, that's
fine.

However, I refreshed the page, I can see IsPostBack is still equal to TRUE,
but I want it to be FALSE
what should I do?
 
When you refresh, it is sending the same information that was sent on the
first submit. From the server's perspective, the user just clicked another
button.

You will have to implement something so that a refresh does not cause a
submit or that duplicate submits are ignored.
 
How would you do that then? I'm a newbie and I need help.
at least you can give me some more hints?

is there something like

if (Page.Refresh== true) then ignore everything?
 
wow... This is cool!
Although I still prefer to write the codes by myself, I guess if I can't
figure it out then I 'll use this.

if you guys know what methods I can use to prevent refresh, then it would be
great. I don't want to use Javascript to prevent refresh.
One question, when you refresh the page, will sessionID 's value change?
Can I compare sessionId to find out whether page is refresh or not?
 
SessionID does not change unless the browser is closed and then opened
again. Since this obviously means the person has left the site, no, you
cannot compare SessionID to detect a refresh. SessionID is primarily used by
the server to remember who is who.
 
Back
Top