Question

I am Uploading the Multiple files to the DB using the Ajax File Uploder, I need to get the names of the files without the Extension like we do in normal file Control.Does any one knows that is there any way to get the filenames Uploaded using the Ajax Uploader. I had searched in the Google and seen many sites but I haven't found any helpful links. I anybody knows some helpful links or Code kindly Suggest Me.

Was it helpful?

Solution

You can use Request.Files to get the files submitted to your page.

e.g.

if (Request.Files.Count > 0)
{
 HttpPostedFile ObjFile = Request.Files[0];
 string filename = strTick + System.IO.Path.GetFileNameWithoutExtension(ObjFile.FileName);
 string originalName = ObjFile.FileName;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top