I'm trying to understand the basics of VBscript in regards to initializing and incrementing variables. This all started while I was trying write a "multi-page" data entry form. Unfortunately, I never could increment the counter successfully.
The following code is a simplified version of this attempt (Note the hitcounter never exceeds 1):
if CStr(Request.Form("Submit")) <> "" then
hitcount = hitcount + 1
Is the hitcount variable re-initializing after each time the "Hit" button is clicked? I tried an alternate version of this where "option explicit; dim hitcount, hitcount=0" were removed, but it didn't make any difference. So what gives?