Our company has a form setup on our website for scholarship applications and I am having an issue with getting file uploads to work. I am using an asp.net page in C# to handle the form data.
From the form:
<form id="scholarForm" name="scholarForm" enctype="multipart/form-data" method="post" runat="server" action="upload_form.aspx">
<input id="transcript" type="file" />
The asp.net page handling the data (code edited for relevance):
protected HttpPostedFile transcript;
transcript = Request.Files["transcript"];
transcript.SaveAs(@"c:\Dollars Applicants\" + fullName + "_" + memberNumber + @"\" + transcript.FileName);
This just produces a null reference error and I am not sure why. I have tried uploading several different file types with no success.
<input id="transcript" name="transcript" type="file" />and check the Request.Files collection in Watch window on debug mode if it contains any file. Also keep in mind that IIS has default limitation on the file size, you can change it in web.config