page continuation integrity

Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: page continuation integrity

  1. #1

    Default page continuation integrity

    Hey guys,<BR>I have a relatively large page that consists of a number of self submit steps. Im selecting case statements to identify each step.<BR><BR>Basically...<BR><BR>Select Case Trim(Request.QueryString("action"))<BR><BR>case "step1"<BR>&#039;do something....<BR><BR>case "step2"<BR>&#039;do something else<BR><BR>case "step3"<BR>&#039;hey why dont we do something<BR><BR>My question is this. How can I somehow identify whether or not the user is actually completing the form step by step in its appropriate order? Meaning, preventing them from editing the querystring value and skipping straight to the 2nd or 3rd step say?<BR><BR>Ive tried a few things but without success.<BR><BR>Any suggestions?<BR><BR>Thanks,<BR>John

  2. #2
    Join Date
    Dec 1969

    Default Why not populate a session

    variable with the previous step value ?

  3. #3

    Default Ive already tried something like this....

    ...however I wouldnt mind seeing your example.<BR><BR>Im all ears at this point.<BR><BR>John

  4. #4

    Default heres what Ive tried...

    case "step1"<BR>session("pagecounter") = 1<BR><BR>case "step2"<BR>session("pagecounter") = session("pagecounter") + 1<BR><BR>This works ok, HOWEVER if the user REFRESHES the page, the count increments and renders my validation check useless....<BR><BR>John

  5. #5
    Join Date
    Dec 1969

    Default Here is what I

    came up with..quick and dirty with little coffee mind you ; )<BR><BR>lngPrevStep = CLng(Session("prevstep"))<BR>lngCurrStep = CLng(Trim(Request.QueryString("action")))<BR><BR>i f (lngCurrStep &#060;&#062; (lngCurrStep - lngPrevStep)) and (lngPrevStep &#062; 0) then<BR> ...redirect user back to correct "next step" and display appropriate message<BR>end if<BR><BR>Select Case lngCurrStep<BR><BR>case 1 <BR> &#039;do something.... <BR><BR>case 2 <BR> &#039;do something else <BR><BR>case 3 <BR> &#039;hey why dont we do something <BR> <BR>....etc..<BR><BR>Session("prevstep") = lngCurrStep

  6. #6
    Join Date
    Dec 1969

    Default Like I said with

    little coffee ; )<BR><BR>Use this<BR><BR>if lngCurrStep &#060;&#062; (lngPrevStep + 1) then

  7. #7

    Default little confused, and tired......

    time for bed. Ill give it another go tomorrow. Seems to be working, just needs fine tuning.<BR><BR>Thanks for your help.<BR><BR>John

  8. #8

    Default this doesnt work, anyone else???

    Again as mentioned, this method becomes useless if a user clicks on refresh within any step, as the counters increment and the error is displayed incorrectly.<BR><BR>Are there better ways to flag this?????<BR><BR>John

  9. #9

    Default Bill, Atrax....anyone?


  10. #10
    Join Date
    Dec 1969

    Default Blech...

    try again:<BR><BR>pc = session("pagecounter")<BR><BR>case "step1"<BR> session("pagecounter") = 1<BR><BR>case "step2"<BR> If InStr(pc,"1") = 0 Then <BR> ... make them do step 1 again ...<BR> Elseif InStr(pc,"2") &#062; 0 Then<BR> Response.Write "You&#039;ve already done step 2"<BR> Else<BR> Session("pc") = "12"<BR> ... stuff ...<BR> End If<BR><BR>case "step3"<BR> If InStr(pc,"1") = 0 OR InStr(pc,"2") = 0 Then <BR> ... make them do step 1 and/or 2 again ...<BR> Elseif InStr(pc,"3") &#062; 0 Then<BR> Response.Write "You&#039;ve already done step 3"<BR> Else<BR> Session("pc") = "123"<BR> ... stuff ...<BR> End If<BR><BR>Something like that. Though that&#039;s probably more complicated than is needed.<BR><BR>But do *NOT* use incrementing! As you said, refresh will kill that.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts