Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Split function against an array like "100,200,300"

Status
Not open for further replies.

RSQUARE

IS-IT--Management
May 3, 2004
5
US
I have a Multi Select list box in a ASP page. It displays some Text values but internally, each text value is given a unique numeric id. All this come from a table. So good, so far.

I followed the idea given at


Now after submission, I tried to use the Split() function to capture the selected items in the list box. But since Request.Form("listbox1") will get me only numeric values delimited by commas, Spilt function doesn't work for me. It requires a string to be split. So what is the workaround


So how to go about it ? What is the best method to tackle this challenge?

Thanks in Advance.

RR.
 
Why are you using split? Its already in a collection so
why use more resources to get it into an array?

for i = 1 to request.form("listbox1").count
'do something to with request.form("listbox")(i)
next
 
Hey ADR,
Thank you very much. You technique, just works. Great

Long live You.

RSquare.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top