Jump to content

Recommended Posts

Posted

I am having set of Names From a Form Posted to ASP file like this

Rajesh, James, Joseph, Raman, Raheem

I have to seperate them and use

HTML goes like this -----

<form method =post action=submitnames.asp>

<textarea name=names></textarea>

<input type=submit name=submit>

ASP goes like this-----

names=request.Form(names)

Response.write("Hi"&names)

Anybody with answer

  • 3 weeks later...

Posted

Hmm, so what exactly is your problem? You can't get it to work, or can't figure it out, or ?? First time using asp? You just added that to the page as is, or you got the proper "header" and <% & %>'s and everything? You can post your actual code if you want and we can correct it, or if you need, I can provide with proper code (just pick the form fields and names ...)

I could help, but I just have to know what you really need or what's not working first

Posted

When you write in a textarea this comes as a single Value in need to seperate them and then Write one by one

Like Hi Rajesh

then Hi Ram

etc.

Posted

names=request.Form(names)

arr = Split(names, "," )

for loopCounter = 0 to ubound(arr)

response.write ("Hello " & arr(loopCounter)

next

this "should" work. It takes your TEXTAREA and Splits it up using the comma as the delimiter. Then after the array has been made it will loop through the array till the last member (ubound) has been reached.

Hope this helps

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...