File Uploaded in C#

Arul44ece
Posted by Arul44ece under C# category on | Points: 40 | Views : 1903
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";

}

Comments or Responses

Posted by: Samarmir on: 11/27/2012 Level:Starter | Status: [Member] | Points: 10
please provide more in depth code and explanation.
e.g. what about the ui code?

Login to post response