Using index on Request iteration

Results 1 to 2 of 2

Thread: Using index on Request iteration

  1. #1
    Join Date
    Dec 1969

    Default Using index on Request iteration

    Hi- <BR>I am using one name value "MessageText" for 4 form text fields and want to know if it is possible to specify a specific item from that string ***Brad Noble, Mesa, 85001, 877-9807*** where the fourth item would be the phone number or should I just parse the string and reassociate the values?<BR><BR>ie.<BR>dim a <BR>a = Request.Form("MessageText").4 <BR><BR><BR><BR><BR>Thanks!<BR>This is a great resource! <BR>Hope I can contribute my fair share!!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Using index on Request iteration

    First off, you should have different form fields for each specific item. However, FYI, if you have a delimited list (as you have a comma-delimited list), you can use the split function (a VBScript function) to break up the list into a one-dimensional array.<BR><BR>So, you could do:<BR><BR>Dim aList, iLoop<BR>aList = split(Request.Form("MessageText"),",")<BR><BR>For iLoop = LBound(aList) to UBound(aList)<BR><BR>Response.Write aList(iLoop) & "<BR>"<BR><BR>Next<BR><BR><BR>See the VBScript Reference pages for more info on split.

Posting Permissions

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