Question : Whenever I am inserting an item in the listbox i.e. list1.items.add (item), I want to add an link button (eg. Remove) for each of the listitem entered. When I will click on the link button, the corrosponding listitem will be removed. Please help me in this matter. Substitute of the listbox can be any other control.
Here i wirte the coding for removing the selcted item from the listbox when we click a button. In case if this is not u r expectation then send a mail to me....
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim n As Integer n = ListBox1.Items.Count MsgBox(n) ListBox1.Items.Remove(ListBox1.SelectedItem) End Sub