Pregunta

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.

¿Fue útil?

Solución

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;
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top