"81.213.224.141","81.213.224.141","UAE","United Emirates","D3","Dubai","WildWadi","","32.100000","3.200100","Telecom","Eutelsat - SanComm". I performed some splitting operations on that string just to get the data between the quotations, hyphens while avoiding commas. I store each parameter in a string and then I assign each string to show in a label. The first IP address I am able to get it to show in the label. However, the second or third or fourth parameter I am not able to show them In other labels. It shows me the index out of range error.
Code:
Dim a = """81.213.224.141"",""81.213.224.141"",""UAE"",""United Emirates"",""D3"",""Dubai"",""WildWadi"","",""32.100000"",""3.200100"",""Telecom"",""Eutelsat - SanComm"""
Dim noQuotes = a.Replace("""", "") ' Update this line with Textbox1.Text
Dim split = noQuotes.Split(",") ' Split on commas
Dim result As New List(Of String)()
For Each str_get As String In split
Dim splitStr = str_get.Split("-") ' Perform secondary split on dash
For Each str_split As String In splitStr
result.Add(str_split.Trim()) ' Enter into result list
Label1.Text = result(0)
Label2.Text = result(1)
Next
Next
Any suggestions ??

New Topic/Question
Reply



MultiQuote





|