StartIndex cannot be less than zero.Parameter name: startIndex string ImageFileExtention = ImageName.Substring(ImageName.LastIndexOf(".")).ToLower(); how i handle this error when uploading photo ...