Hi ,
The below code is used for upload file through directory.
if (FileUpload1.HasFile)
{
try
{
FileUpload1.SaveAs("H:\\Study\\Shift\\Upload Files\\" + FileUpload1.FileName);
lblMessgae.Text = FileUpload1.FileName + " " + FileUpload1.PostedFile.ContentLength + "kb" + " file has been uploaded Successfully";
}
catch (Exception ex)
{
lblMessgae.Text = "Error : " + ex.Message.ToString();
}
}
else
{
lblMessgae.Text = "You have not Specified a files";
}