Victor Charles
asked on
Help with retreiving data from litbox
I am using the code below to retreive data from a listbox with multiple rows but receiving error:
Error: Public member 'Text' on type 'String' not found.
On line:
If CheckForNSNFix.Contains(C1 NSN.Items( x).Text) Then
Code:
For x As Integer = 0 To C1NSN.Items.Count - 1
If CheckForNSNFix.Contains(C1 NSN.Items( x).Text) Then
For Each xnLink As Xml.XmlNode In xdNSN.SelectNodes("/Root/N SNTable[NS N='" & C1NSN.Items(x).Text & "']")
NSN_ID = xnLink.SelectSingleNode("N SN_ID").In nerText
''''MsgBox("NNSN" & NSN_ID)
If NSN_ID <> "" Then
CD = NSN_ID
If u > 0 Then
num1 = num1 & "" & CD & ","
Else
num1 = CD & ","
End If
u = u + 1
End If
Next
End If
Next
How do I fix this error? This is Windows applictaion (VS 2010)
V.
Error: Public member 'Text' on type 'String' not found.
On line:
If CheckForNSNFix.Contains(C1
Code:
For x As Integer = 0 To C1NSN.Items.Count - 1
If CheckForNSNFix.Contains(C1
For Each xnLink As Xml.XmlNode In xdNSN.SelectNodes("/Root/N
NSN_ID = xnLink.SelectSingleNode("N
''''MsgBox("NNSN" & NSN_ID)
If NSN_ID <> "" Then
CD = NSN_ID
If u > 0 Then
num1 = num1 & "" & CD & ","
Else
num1 = CD & ","
End If
u = u + 1
End If
Next
End If
Next
How do I fix this error? This is Windows applictaion (VS 2010)
V.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It worked. Thanks.
My string value contains a comma at the end (i.e. 1,2,4,) . How do I remove the comma from the string variable num1?
My string value contains a comma at the end (i.e. 1,2,4,) . How do I remove the comma from the string variable num1?
& "," adds the comma to your string. If you want to remove the last char in a string look into .TrimEnd.
ASKER
Thanks!
ASKER
Public member 'Text' on type 'String' not found.
Any ideas how to fix that error?
Thanks,
V.