Upload File Programmatically Using FileUpload Tool

Use this code to use fileupload tool in visual studio. This code will upload the file in the task or library that has been specified.