Click to See Complete Forum and Search --> : Refresh after posting a form
jayapalchandran
11-09-2005, 08:19 AM
I am sending information through form variables into a database.
when i refresh the page the same values are getting into the database
what i want is after sending form variables it should be cleared in the buffer or whatever area it is stored temply. i want help. jayapalchandran
lmf232s
11-09-2005, 11:33 AM
what i always do is a redirect back to the same page so that if you refresh the page, it is refreshing the page load instead of the Database update.
Example
set oRS1 = oConn.Execute(SQL)
Response.redirect "Back2theSamePage.asp?id=222&redirect=True"
You can pass variables in the query string if you need them else just a redirect should solve the problem.
Bullschmidt
11-10-2005, 03:32 PM
Related links:
Classic ASP Design Tips - Post Back Page
http://www.bullschmidt.com/devtip-postbackpage.asp
Classic ASP Design Tips - Dependent Listboxes
http://www.bullschmidt.com/devtip-dependentlistboxes.asp
And www.asp101.com/samples has some good, short database examples.
jayapalchandran
12-21-2006, 10:51 AM
people can use AJAX to send information to the server instead of submitting the page. i havent done this but this is the information i got for my problem stated above...
go to ajax page in w3schools. their tutorial is simple and easy... enjoy...
jayapalchandran
10-29-2008, 04:41 AM
and then after a long time i accidentally i did a code which worked like the first reply and i am using it. so the best way is to redirect with a different query string.