Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Url 关于使用vb.net在字符串中拆分命令_Url_Query String - Fatal编程技术网

Url 关于使用vb.net在字符串中拆分命令

Url 关于使用vb.net在字符串中拆分命令,url,query-string,Url,Query String,我有url。它包含如下所示的查询字符串值。若要拆分url并将查询字符串值存储在数组中,则在应用程序中不会传递查询字符串值。 它来自另一个应用程序 url ---- http://.....?lead_id=152818&vendor_id=100001&list_id=1001&gmt_offset_now=0.00&phone_code=91&phone_number=9942321400&title=MR&first_name=Hari

我有url。它包含如下所示的查询字符串值。若要拆分url并将查询字符串值存储在数组中,则在应用程序中不会传递查询字符串值。 它来自另一个应用程序

url
----
http://.....?lead_id=152818&vendor_id=100001&list_id=1001&gmt_offset_now=0.00&phone_code=91&phone_number=9942321400&title=MR&first_name=Hari&middle_initial=Q&last_name=PUBLIC&address1=249+MUNDON+ROAD&address2=MALDON&address3=FL&city=44&state=TN&province=NO_PROVINCE&postal_code=600004&country_code=IN&gender=M&date_of_birth=0000-00-00&alt_phone=9942321400&email=test@test.com&security_phrase=nothing&comments=COMMENTS&user=22222&pass=test&campaign=OUTBOUND&phone_login=22222&original_phone_login=22222&phone_pass=test&fronter=22222&closer=22222&group=OUTBOUND&channel_group=OUTBOUND&SQLdate=2012-08-07+164931&epoch=1344338372&uniqueid=1344338352.12754&customer_zap_channel=&customer_server_ip=&server_ip=10.103.200.177&SIPexten=22222&session_id=8600062&phone=9942321400&parked_by=152818&dispo=N&dialed_number=9942321400&dialed_label=MAIN&source_id=10001&rank=1&owner=Southeast&camp_script=&in_script=&script_width=600&script_height=340&fullname=J.Hariharan&recording_filename=OUTBOUND_20120807-164911_22222_9942321400&recording_id=248601&user_custom_one=&user_custom_two=&user_custom_three=&user_custom_four=&user_custom_five=&preset_number_a=&preset_number_b=&preset_number_c=&preset_number_d=&preset_number_e=&preset_dtmf_a=&preset_dtmf_b=&session_name=1344338181_2222216466857"



my question is i want to store the querystring values in an one dimensional string 
array.


my code
-------
Dim strarr() As String
    Dim s As String = "http://...../test.aspx?lead_id=152818&vendor_id=100001&list_id=1001&gmt_offset_now=0.00&phone_code=91&phone_number=9942321400&title=MR&first_name=Hari&middle_initial=Q&last_name=PUBLIC&address1=249+MUNDON+ROAD&address2=MALDON&address3=FL&city=44&state=TN&province=NO_PROVINCE&postal_code=600004&country_code=IN&gender=M&date_of_birth=0000-00-00&alt_phone=9942321400&email=test@test.com&security_phrase=nothing&comments=COMMENTS&user=22222&pass=test&campaign=OUTBOUND&phone_login=22222&original_phone_login=22222&phone_pass=test&fronter=22222&closer=22222&group=OUTBOUND&channel_group=OUTBOUND&SQLdate=2012-08-07+164931&epoch=1344338372&uniqueid=1344338352.12754&customer_zap_channel=&customer_server_ip=&server_ip=10.103.200.177&SIPexten=22222&session_id=8600062&phone=9942321400&parked_by=152818&dispo=N&dialed_number=9942321400&dialed_label=MAIN&source_id=10001&rank=1&owner=Southeast&camp_script=&in_script=&script_width=600&script_height=340&fullname=J.Hariharan&recording_filename=OUTBOUND_20120807-164911_22222_9942321400&recording_id=248601&user_custom_one=&user_custom_two=&user_custom_three=&user_custom_four=&user_custom_five=&preset_number_a=&preset_number_b=&preset_number_c=&preset_number_d=&preset_number_e=&preset_dtmf_a=&preset_dtmf_b=&session_name=1344338181_2222216466857"
    strarr = s.Split("?")
    Dim s1 As String = strarr(1)
    Dim constr() As String
    constr = s1.Split("&")


but am not get correct result


my result
---------
list_id=1001
gmt_offset_now=0.00
phone_code=91
phone_number=9942321400


expected result
---------------
  1001
  0.00
  91
  9942321400

在“constr”上迭代并使用另一个拆分(按“=”)。结果可以存储在(字符串的)列表中

(类似这样的)

要查看此内容,您应该列出“r”中的所有项目,因此您需要另一个

for each item in r
   console.writeline(item)
next

您也可以在第一个循环中执行此操作。

Kuczynski在dim语句中遇到错误。like类型“list”不是defined@Kuczynski我纠正它。但我不知道如何看待结果
for each item in r
   console.writeline(item)
next