Author: lyealain | Posted on: 4/12/2009 2:17:02 AM | Views : 461

hi may i know how to open the file through double click on the item in listbox??
below is the way i bind to the listbox1 lbAttachmentUploaded.Items.Clear();
2 SaveToPath = HttpContext.Current.Server.MapPath("Attachments//" + ship.Id.ToString("000000"));
3 string[] files = Directory.GetFiles(SaveToPath);
4 foreach (string f in files)
5 {
6 string fileName = System.IO.Path.GetFileName(f);
7 ListItem fileItem = new ListItem(fileName, f);
8 lbAttachmentUploaded.Items.Add(fileItem);
9 }
  ...

Go to the complete details ...