Looping through a request.querystring in VB.NET

后端 未结 6 2086
我寻月下人不归
我寻月下人不归 2020-12-18 08:53

I am trying to loop through a query string and pull out certain values as in:

?ProductID=1234&ProductID=4321&Quantity=1

For each va

6条回答
  •  自闭症患者
    2020-12-18 09:35

    Here is some untested psuedo code that should work for the code behind on the page. I hope this helps.

    dim key as string
    dim list as new arraylist()
    for each key in Page.Request.QueryString.Keys
     if key = "ProductID" then
       list.add(Page.Request.QueryString(key))
     end if
    next key
    
    ' do somthing with the list of product id's
    

提交回复
热议问题