Sir,
I am using File upload control to upload image and store images in database
When i browse the image
My file path is D:\sample\Slide1.JPG
How to i get the folder name ie 'sample' from above path?
string directory = System.IO.Path.GetDirectoryName("D:\\sample\\Slide1.JPG"); string folderName = System.IO.Directory.CreateDirectory(directory).Name;
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.