p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_codeclinic thread: Refreshing A Page after Update

Message #1 by "Rick Brose" <brose@u...> on Mon, 23 Apr 2001 14:59:18
    I implement a complex series/flow of Request.Form("action") and
Request.Form("mode") so all add, edits, saves, and displays occur from the same
page.  If you'd like an example I'll see what I can dig up that doesn't rely too
heavily on #include files.

- Chuck

----- Original Message -----
From: "Earls, Michael (CORP)" <Michael.Earls@C...>
To: "Code Clinic" <proasp_codeclinic@p...>
Sent: Monday, April 23, 2001 12:04 PM
Subject: [proasp_codeclinic] RE: Refreshing A Page after Update

> Normally, I put the database update code in an ASP page with no UI. The main
> page would POST to this page, it would update the database, and redirect the
> user to the result page.  In your case, I would probably redirect the user
> back to where they started after the database update.  If the UI
> automatically loads the latest information , this should work.
> Michael Earls
> -----Original Message-----
> From: Rick Brose [mailto:brose@u...]
> Sent: Monday, April 23, 2001 7:59 AM
> To: Code Clinic
> Subject: [proasp_codeclinic] Refreshing A Page after Update
> I created a page that lists out a table with some criteria and a
> corresponding checkbox for each one. The user is to make their checks and
> then hit update to save it in the database. All this works. However, when
> the user updates the page it will save it in the database but the page
> won't reflect it until it is refreshed again. Usually to refresh a page I
> will use a response.write("<script
> language='JavaScript'>window.location.reload()</script>")
> line. To use this I would need to put it at the end of my 'If Request
> ("Update") = "Update" Then' line but the page will reload with the Update
> parameter still being passed therefore causing the page to endlessly
> reload. Is there a better way to refresh a page without passing all the
> parameters? Is there a way to refresh with the page picking up from where
> it left off right before the refresh? Any ideas? Thanks.

  Return to Index