REfreshing

Y

Yama

Hi,

At times when I refresh my asp.net page I get the message box: to retry or
cancel the reload of the page.

How to fix this? Any suggestion?

Thanks,

Yama
 
K

Kevin Spencer

In browsers, when you refresh a page that has returned as the result of a
form POST, the form is re-submitted. AFAIK, all browsers will prompt you to
see if you truly want to re-submit a form. PostBacks submit a form to the
server.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
G

Guest

What Kevin said is true (for all browsers I know of). A tip to avoid this that I use regularly. Let's say you have a button on the page. Then in the code-behind you have an event handler for the button click event. You may want to do something like this:

public sub Clicked(...)
'do stuff...
Response.Redirect( [same page or new page here] )
end sub

You can do this with any event. Just redirect to the same page. Make sure if you do you this you store page state somewhere (query strings, session, or database) so it can be restored on page load.

HTH,
Ryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top