How to convert Request.QueryString to String? - VB.NET

predseda

Newcomer
Joined
Jan 2, 2004
Messages
21
Location
Slovakia - European Union
Hello devs,
I'd like to ask you how can I convert collection of variabiles - Request.QueryString to String or how can I use its data.

Dim str As String
str=Cstr(Request.QueryString)

...this is not working because Request.QueryString returns data in a special kind of variabile.

Please help.

Thanks.
 
What kind of data do you want to turn it into? Do you really want all the values stuffed into a string? You can iterate thru the Request object and create an array list.
 
u can use this method to get the set of querystrings for a page
Dim i As Integer

Dim myCollection As System.Collections.Specialized.NameValueCollection
myCollection = Request.QueryString()

For i = 0 To myCollection .Count - 1
Response.Write(myCollection .Keys(i) & " " & myCollection .Item(i) & "<Br>")
Next
 
Back
Top