I am trying to remove an Attachment from SPList , i would like to remove it from an webpart , that uses an Listbox and an Delete Button
oreach (SPListItem customer in items)
{
// ett fält som är dolt som håller i idet
HiddenField1.Value = customer["ID"].ToString();
TextBox_Name.Text = customer["Title"].ToString();
TextBox_ProdNum.Text = customer["ProductNumber"].ToString();
TextBox_Color.Text = customer["Color"].ToString();
TextBox_ListPrice.Text = customer["ListPrice"].ToString();
TextBox_MoreInfo.Text = customer["More Info"] != null
? customer["More Info"].ToString()
: string.Empty;
ListBox1.Items.Add(new ListItem(customer.Attachments.Add(// here it ask for an leaf but i dont know what it is)));