Loop thru textarea

Results 1 to 2 of 2

Thread: Loop thru textarea

  1. #1
    Join Date
    Dec 1969

    Default Loop thru textarea

    I have a textarea box that users are going to place email addresses in.<BR><BR>1 per line.<BR><BR>How do I loop thru each line and then utilize it in a sql statement. Such as 1st line delete from db table, next line, delete from db table.<BR><BR>I can&#039t save this into a flat text file since I am using multiple servers to distribute load time.<BR><BR>Any help would be appreciated.<BR><BR>Thanks

  2. #2
    Steve Cimino Guest

    Default RE: Loop thru textarea

    I think you&#039re looking for trouble doing it this way. What if I don&#039t enter an email address, and instead enter kj;kj;kj (or to complicate it more, iji&#039&#039&#039&#039&#039&#039)<BR><BR>Anyway, that&#039s not what you asked. Read the value into a string, using Request.Form. Split the string on a vbcrlf (assuming your user puts in hard breaks). Then run your statements with each element in the array.

Posting Permissions

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