vb.net - Send webrequest after spliting data in Listbox in ":" format -


hello have listbox contains different lines in user:pass format how can split them in such way to send webrequest each item in listbox . have tried send request first item in listbox want send webrequest items in .

for each item in listbox1.items                 dim z = item.split(":").getvalue(0)                 dim zz = item.split(":").getvalue(1)  next 

put webrequest inside loop , use ,dim z() string = item.split(":"). z(0) user , z(1) pass , change each iteration of loop.

a suggestion though, dictionary(of string, string) might better storage option data, since won't expose straying eyes.

or listview 2 columns. using view option, list, show first column, data second column still accessible.

update:

a dictionary collection of key,value pairs. if want can think of in terms of array. array can described being collection of key,value pairs. index of item key , value of item value. dictionary works same way, additional flexibility of assigning type being key. dictionary class includes methods adding, removing, etc., , linq compliant.

in example make user key , password value. each loop this:

for each kv keyvaluepair in mydictionary 

kv.key user , kv.value password.

here's msdn article if want more detailed information.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -