ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 14th, 2003, 11:11 AM
don_sparko's Avatar
don_sparko don_sparko is offline
Digitally Challenged
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 280 don_sparko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 6
arrays, form variables and ubound

ok i'm trying to assign a form variable to an array, and then getting the ubound (how many elements).
so request.form("ok") as a string looks like this
ok, ok, ok, ok
but then when i try to make it an array out of it it doesn't look like its working. here is my code and output
Code:
<%stringval = request.form("ok")%>
<%=stringval%>
<%funky = array(stringval)%>
<%=isarray(funky)%>
<%=ubound(funky)%>

and the output
ok, ok, ok, ok, ok
True
0

So why am i getting '0' for ubound when there should be any number of items in the array. help!
__________________
My brain cells are like a storm trooper's armor: useless

Reply With Quote
  #2  
Old August 14th, 2003, 11:32 AM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Use Split()

<%
Dim MyArr
Dim MyString

MyArr = Split(MyString, ", ")


Response.Write Ubond(MyArr)

NOTE: The delimiter is NOT just a comma, its a COMMA-SPACE
%>

Hope this helps!
Sincerely

Vlince

Reply With Quote
  #3  
Old August 14th, 2003, 11:42 AM
don_sparko's Avatar
don_sparko don_sparko is offline
Digitally Challenged
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 280 don_sparko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 6
thanks! works perfect!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > arrays, form variables and ubound


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway