?
Solved

ASP.NET - Feed QueryString varaibles into Array..to pass to a function..

Posted on 2011-05-03
3
Medium Priority
?
282 Views
Last Modified: 2012-08-13
I have this where data is being passed thru a query string...but I need an array to capture to pass that array to a function:


 Public Sub page_load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

'  www.sbccomp.com/custom_page.aspx?ID='123'&COLOR='blue'&MSG_1='x'&P_NUM_1='x'
'  &MSG_2='x'&P_NUM_2='x'&MSG_3='x'&P_NUM_='x'&MSG_4='x'&P_NUM_4='x'....

for every MSG_1='x'&P_NUM_1='x'
array.add = xxxx
Next

run_to_sql(array)
End function




dim var_ID_value as string
dim var_COLOR_value as string

var_ID_value  = Request.QueryString("ID")
var_COLOR_value  = Request.QueryString("COLOR")

' feed the varaibles into a sql piece that I already have...

...code..xxx...

end sub
0
Comment
Question by:GlobaLevel
  • 2
3 Comments
 
LVL 10

Author Comment

by:GlobaLevel
ID: 35514508
I FOUND IT IN c#..TYRING TO CONVERT TO VB.NET

      Dim loop1 As String, loop2 As String
        Dim arr2 As Array, arr1 As Array
        Dim my_array As Array
        Dim coll As NameValueCollection
        loop1 = 0
        loop2 = 0

        ' Load NameValueCollection object.
        coll = Request.QueryString
        'Get names of all keys into a string array.
        arr1 = coll.AllKeys
        ' for (loop1 = 0; loop1 < arr1.Length; loop1++)
           for loop1 TO arr1.Length
            Response.Write("Key: " + Server.HtmlEncode(arr1(loop1)) + "<br>")
            arr2 = coll.GetValues(arr1(loop1))
            'for (loop2 = 0; loop2 < arr2.Length; loop2++)
            for loop2 TO arr2.Length
                my_array.add("Value " + loop2 + ": " + Server.HtmlEncode(arr2(loop2) + "<br>"))
            Next
        Next
0
 
LVL 10

Author Comment

by:GlobaLevel
ID: 35515571
ANY HELP?
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 35517409
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Loops Section Overview
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question