I'm new to asp.net/vb.net. I have a string that is in querystring format, that is the string is formatted: value1=data1&value2=data2...
I need a way (i'm sure theirs probably a built in function for it) to be able to get the value for any given field such as Dim data1 = string.querystring("value1"). I googlged it and found the function querystring but it only seems to work on getting straight from a URL, but I have that data stored in a string variable and want to get the data from this. Is this possible?
HttpUtility.ParseQueryString
, you can call it in any context as it just expects string parameter. Just add a reference to System.Web
, you can do it even it desktop apps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.