Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
Try the following :string filename = System.IO.Path.GetFileName(fileUpload1.PostedFile.FileName);
The Question is already answered at CodeProjectThe name 'Path' does not exist in the current context[^]hope it helped!