Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keep posting over & over, etc.
Message
Information générale
Forum:
Internet
Catégorie:
Active Server Page
Divers
Thread ID:
00438968
Message ID:
00438975
Vues:
10
>The way I built my asp pages, I have a hidden field to flag posting on every submit form and the posting page have codes like this to see if I need to post the data:
>
>If Request.Form ("postcount")="yes" Then
> PostCountData
>End If
>
>However, I've just found a problem with this approach. When the user manually refreshes the page by clicking on browser's refresh button, the data gets posted again and again. Since the value returned from Request.Form is the same ("yes" in this case), it just keeps posting regardless if it was already posted.
>
>Is there an easy way to either check if posted already or set the form value to "no"? TIA.

You can check to see if the request.servervariables("http_referer") is the current page. If it is, then the form was posted to itself, if not, it was refreshed.
Tim Westmoreland
Software Engineer
Skyline Technologies, Inc.

"Upper classes are a nation's past; the middle class is its future." - Ayn Rand, Russian-born author (1905-1982).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform