Hi
I upload powerpoint file using this code:
if (File1.PostedFile !=null) //Checking for valid file
{
// Since the PostedFile.FileNameFileName gives the entire path we use Substring function to rip of the filename alone.
string StrFileName = File1.PostedFile.FileName.Substring(File1.PostedFile.FileName.LastIndexOf("\\") + 1) ;
string StrFileType = File1.PostedFile.ContentType ;
int IntFileSize =File1.PostedFile.ContentLength;
//Checking for the length of the file. If length is 0 then file is not uploaded.
if (IntFileSize <=0)
Response.Write(" <font color='Red' size='2'>Uploading of file " + StrFileName + " failed </font>");
else
{
File1.PostedFile.SaveAs(Server.MapPath("./powerpoint/" + StrFileName));
Response.Write( "<font color='green' size='2'>Your file " + StrFileName + " of type " + StrFileType + " and size " + IntFileSize.ToString() + " bytes was uploaded successfully</font>");
}
}
My problem is that I want to show all uploaded powerpoint file in specified folder in web server (Like attachment ). How I can do this.