Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 802301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:34:46+00:00 2026-05-14T23:34:46+00:00

I have splitted comma separated values in an string array, something like this str[0]

  • 0

I have splitted comma separated values in an string array, something like this

str[0] ="210"
str[1] ="abc.pdf"
str[2] = "211"
str[3] = "xyz.docx"

and so on. Please note 0,2,4,6,8 [even positions] are having number and odd positions are having string.

I am having a class Attachmodel

Public Class AttachmentModel

Private _attachmentID As Integer = 0
Private _attachmentPath As String = ""

''' <summary>
''' Get Set Attachment ID
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>

Public Property AttachmentID() As Integer
    Get
        Return _attachmentID
    End Get
    Set(ByVal value As Integer)
        _attachmentID = value
    End Set
End Property

''' <summary>
''' Get Set Attachment Path
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>

Public Property AttachmentPath() As String
    Get
        Return _attachmentPath
    End Get
    Set(ByVal value As String)
        _attachmentPath = value
    End Set
End Property

End Class

In the above i want to set the values and bind it to the grid, using List

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:34:46+00:00Added an answer on May 14, 2026 at 11:34 pm

    I want to bind CSV string with listbox programmatically

    Private Sub BindAttachmentsToListBox(ByVal collectionData As String)
            Dim arrayString As String()
            Dim separator As String() = {",", "\n", " "}
            Dim attachmentList As New List(Of AttachmentModel)
            arrayString = collectionData.ToString().Split(separator, StringSplitOptions.RemoveEmptyEntries)
    
            For i As Integer = 0 To arrayString.Length - 1
                Dim attachments As New AttachmentModel()
    
                attachments.AttachmentID = Integer.Parse(arrayString(i).ToString().Trim())
                attachments.AttachmentPath = arrayString(i + 1).ToString.Trim()
    
                attachmentList.Add(attachments)
                i = i + 1
            Next
    
            lbAttachments.DataSource = attachmentList
            lbAttachments.DisplayMember = "AttachmentPath"
            lbAttachments.ValueMember = "AttachmentID"
    
    
        End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the string like this: String s = word=PS1,p1,p2,p3=q1,q2|word2=PS3,p4,p5,p6=q3; or like this: String
I have a long string with double-type values separated by # - value1#value2#value3# etc
I have this code, that takes a string and splits it into an array:
i have a String Array which comes from a splitted String string[] newName= oldName.Split('\\');
I have a table with values in one column which have to be splitted
I have some keywords in one string splitted with . I have also table
I have a loop, like so: for (i < splitted.Length; i++ != 0) {
I have a csv that looks like Deamon,Host,1:2:4,aaa.03 Pixe,Paradigm,1:3:5,11.us I need to read this
I have this code : stringCutted = myString.Split(/). // ??? and I'd like to
I have two textviews like this: ======================= = TextView1 TextView2 = ======================= And I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.