i am trying to save values in a textbox for each item in a list of items. The textbox will prompt for values and a button(btnTag) saves the value to the item in a list.

The code below saves the value of the textbox for all the items in the list, but i want it saved individually

Dim counter As Integer
        For counter = NextPhotoNumber To PhotostoView.Count
            blockOfText = txtTag.Text
        Next

        If Len(txtTag.Text) = 0 Then
            MsgBox("Invalid Number Format", MsgBoxStyle.OkOnly)

            txtTag.Text = blockOfText
            lblStatus.Visible = False

        End If
        Me.NextPhotoNumber += 1
        images.tagging()
        Me.DisplayImage()
        btnNext.Enabled = True
        btnPrevious.Enabled = True
        txtTag.Clear()
        txtTag.Select()

thanks

I didn't understand your question. You need user to type in textbox then press on button, which will take textbox text and add it to list?

I am designing a picture identification application. When pictures have been uploaded, then i want to tag each of the pictures in list. As they appear via a NEXt button using one textbx

I am designing a picture identification application. When pictures have been uploaded, then i want to tag each of the pictures in list. As they appear via a NEXt button using one textbx

i guess you should create a unique "ID" for each picture so that it is easy for you to find/manipulate.

there was an error, the first two pictures were successfully tagged but the third it said.
Item has already been added. Key in dictionary: 'untagged' Key being added: 'untagged'

this is my current code

txtTag.Text = blockOfText

        If Len(txtTag.Text) = 0 Then
            MsgBox("     Image not tagged ", MsgBoxStyle.Exclamation)
            blockOfText = "untagged"

        Else
            txtTag.Text = blockOfText
            lblStatus.Visible = False
        End If
        Me.PhotostoView.Add(txtTag.Text)
This article has been dead for over six months. Start a new discussion instead.