I am using the tag to upload a file to the server. How do I access the file at the server side and store it at the server? (The fi
If you give the input-tag an id and add the runat="server" attribute then you can access it easily.
First change your input tag:
Then add the following to your Page_Load method:
if (FileUpload.PostedFile != null)
{
FileUpload.PostedFile.SaveAs(@"some path here");
}
This will write your file to a folder of your choice. You can access the PostedFile object if you need to determine the file type or original file name.