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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Array? Can it be done?

Status
Not open for further replies.

davman2002

Programmer
Nov 4, 2002
75
US
Is it possible to declare a single diminsion array in ASP?

My curent code that does not work is

Counter = 0

For i = 1 to 18
CurrentValue = Request.QueryString("B"& i)
If CurrentValue <> &quot;&quot; then
Temp(Counter) = CurrentValue
End IF
Counter = Counter + 1
Next
 
Although I know that is not proper to repost. I have discovered the answer and for those interested here it is

Dim BArray 'Declare Varient
Redim BArray(18) 'Redim as array
BCounter = 0 'set counter for Array
BTtlAryCount = 0 'Set Counter for total values in array

For i = 1 to 18

Value = Request.QueryString(&quot;B&quot;& i)

If Value <> &quot;&quot; then
BArray(BCounter) = Value
End IF
BCounter = BCounter + 1
Next

BTtlAryCount = BCounter
 
davman2002
Thanks for sharing your findings with everyone
great way to help everyone when you find answers to your questions and post them


BTW: there's absolutely nothing wrong with replying to your own thread. Especially when your helping otehrs as you help yourself. [wink] _________________________________________________________
for the best results to your questions: FAQ333-2924
Is your question a most FAQ?? Find out here FAQ333-3048
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top