Post a form multiple times with ASP
Hey Guys,
This is probably really simple. I was just wanting some thoughts on the best way to perform this function. I have a form that I would like to submit a predefined number of times. The thing is that once the form is submitted I am redirected to the receiving page.
Any thoughts?
Thanks,
Mike
Peter J. Boettcher posted this at 20:36 — 14th May 2001.
They have: 812 posts
Joined: Feb 2000
I'm not sure why you would want to do this, but it's achieved easily enough with a loop, check out the following:
Dim intCounter
Dim intLoopFor
Dim strFormField
intCounter = 0
intLoopFor = 30
strFormField = Request.Form("MyField")
Do While intCounter <= intLoopFor
'Do whatever it is you want to do here
intCounter = intCounter + 1
Loop
Response.Redirect "somewhere.asp"
PJ | Are we there yet?
pjboettcher.com
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.