Upload/edit image in ASP.NET (CSASPNETImageEditUpload)

The ASP.NET code sample illustrates how to upload, read, display, update and delete images stored in a database.

C# (2.5 MB)
4.3 Star
53,053 times
Add to favorites
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question

  • do not download! not working!
    1 Posts | Last post April 29, 2014
    • the program fail!
  • Creating error when try to Insert a new image.
    4 Posts | Last post March 16, 2013
    • The error is:
      Could not find file 'C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\49037_100001592514519_6443516_n.jpg'.
      Please give me a solution.
    • Agree ... simply does not work.
    • The fact that 25k downloads are claimed, but only one other person bothered to declare the sample does not work, puts into question msdn's verification process for these samples.
      Throws exception here:
      protected void fvPersonDetails_ItemUpdating(object sender, FormViewUpdateEventArgs e)
        CustomValidator cv = fvPersonDetails.FindControl("cmvImageType") as CustomValidator;
                  e.Cancel = !cv.IsValid;
                  FileUpload fup = (FileUpload)fvPersonDetails.FindControl("fupEditImage");
                  if (cv.IsValid && fup.PostedFile.FileName.Trim() != "")
                      e.NewValues["PersonImage"] = File.ReadAllBytes(fup.PostedFile.FileName);
                      e.NewValues["PersonImageType"] = fup.PostedFile.ContentType;
    • plz help me what to do?
      Could not create type 'CSASPNETImageEditUpload.ImageHandler'