0

Can't seem to find an answer for this anywhere.

I'm using Alex K.'s solution to send the array in the query string, but I don't know how to break down the array in VB.NET.

No variation of this

 Dim qryArray As String() = context.Request.QueryString("qryArray")

is working. It keeps saying qryArray is not declared when I try to use it.

Thanks in advance!

EDIT

I used this format to send the values in the query string:

qryArray =[value1,...,valueN]

Thanks again for taking your time to help!

1
  • AlexK gave three different answers at that link. You will need to be clear about how your query string is coded. Commented Oct 15, 2012 at 16:06

1 Answer 1

0

Just try like below example I used..It is created using arraylist. result will be a string in form of ("value10,value11,value12,value13") which is ready to be passed in query.In first array i.e array1, remove the duplicates

    Dim Array1 As New ArrayList
    Dim Array_Com As New ArrayList
    Dim Word_1 As String = "Value1"
    Dim word_2 As String = "("""
    Dim i As Int32
    Dim j As Int32
    Dim k As Int32 = Array1.Count

    For i = 0 To 3
        Array1.Add(Word_1 & i)
    Next
    For j = 0 To Array1.Count - 1
        If k < Array1.Count - 1 Then
            Array_Com.Add(Array1.Item(j) & ",")
            'MsgBox(Array_Com.Item(j))
            k += 1
        Else
            Array_Com.Add(Array1.Item(j) & """" & ")")
        End If

    Next
Sign up to request clarification or add additional context in comments.

1 Comment

Haroon - you can just delete your answer if you're not happy with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.