Solved

Help with retreiving data from litbox

Posted on 2012-12-22
5
392 Views
Last Modified: 2012-12-22
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(C1NSN.Items(x).Text) Then

Code:

 For x As Integer = 0 To C1NSN.Items.Count - 1
                If CheckForNSNFix.Contains(C1NSN.Items(x).Text) Then
                    For Each xnLink As Xml.XmlNode In xdNSN.SelectNodes("/Root/NSNTable[NSN='" & C1NSN.Items(x).Text & "']")
                        NSN_ID = xnLink.SelectSingleNode("NSN_ID").InnerText
                        ''''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.
0
Comment
Question by:vcharles
  • 3
  • 2
5 Comments
 
LVL 26

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 38716200
Remove the .Text from that line.

If that doesn't help see this and this
0
 

Author Comment

by:vcharles
ID: 38716217
I removed it, but on the following line I receive the following error:

Public member 'Text' on type 'String' not found.

Any ideas how to fix that error?

Thanks,

V.
0
 

Author Comment

by:vcharles
ID: 38716221
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?
0
 
LVL 26

Expert Comment

by:MacroShadow
ID: 38716239
& "," adds the comma to your string. If you want to remove the last char in a string look into .TrimEnd.
0
 

Author Comment

by:vcharles
ID: 38716250
Thanks!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now