Text Box Array

Results 1 to 2 of 2

Thread: Text Box Array

  1. #1
    Join Date
    Dec 1969

    Default Text Box Array

    I have a number of text boxes on my ASP page all named the same. When I submit the text boxes I am using the Split function to put them into an array. Instead of using the comma as a delimeter, I want to use the pipe character as the delimeter. Can I do this? If so, how?

  2. #2
    Join Date
    Dec 1969

    Default RE: Text Box Array

    You can&#039;t change the delimiter...that&#039;s hard coded into the Request.Form and Request.QueryString collections.<BR><BR>You didn&#039;t say *why* you wanted this, but I presume it is because you want to be able to allow commas in the text boxes. Yes?<BR><BR>If so, there&#039;s an easy solution:<BR><BR>&#060;%<BR>tbCount = Request.Form("CommonName").Count<BR>For i = 1 To tbCount<BR>&nbsp; &nbsp; Response.Write i & ": " & Request.Form("CommonName")(i) & "&lt;BR&#062;"<BR>Next<BR>%&#062;<BR><BR>Yes, you can treat the multiple responses as an array *without* using split!<BR><BR>You must code as shown. You can&#039;t assign Request.Form("xxx") to some variable and then use *it* as an array. It won&#039;t work because of a minor bug in the collection code. <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