Refresh button

  • Thread starter Thread starter Jeremy
  • Start date Start date
J

Jeremy

I'm sure this has to be in an FAQ somewhere, but I
couldn't find anything about it. When I click
the "Refresh" button in my browser I preform the last HTTP
method I did. Needless to say, this is not the
functionality of a refresh button that I would like.

When I click on "Refresh" I want the page to completely
reload and drop all of the view state information it is
currently holding and treat it like a brand new request.
(Basically, like how a refresh does with classic ASP and
HTML, etc.)

Is there any way to get around this new "feature" of
ASP.NET?

Thanks,
Jeremy
 
You can clear your ViewState information programmatically or you can turn it
off if you don't want it at all. You could try detecting on Page_Load
whether your code has "seen" the page in its current state and then skip any
re-processing or you could try trapping the refresh event with javascript.
I guess one question would be: why do you want to do this (or not do this,
to be more precise)?

Regards,
Stephen
 
Back
Top