Fileupload control using asp.net
if (FileUpload1.HasFile)
{
string fileName = Path.GetFileName(FileUpload1.PostedFile.FileName);
string fileExtension = Path.GetExtension(FileUpload1.PostedFile.FileName);
string fileLocation = Server.MapPath("~/NewFolder1/" + fileName);
FileUpload1.SaveAs(fileLocation);
lblattchament1.Text += String.Format("{0},", FileUpload1.FileName);
}
No comments:
Post a Comment