I have existing legacy code that is using a standard form.
I would like to in the page init event of the code behind grab a handle to this input type="file" element, and convert it to a .net fileUpload object.
Is this possible? Without rewriting the whole form?
Thanks in advance.
EDIT: Not looking for an example of how to handle the upload processing, just looking for the entry point - how to get a reference to the input type=file and treat it as a .net fileupload object. - Thanks again.
I was thinking along the lines of :
Dim myControl1 as FileUpload = FindControl("myFileElement")
Would this work if I could sort out the casting issue?
runat='server'andidattributes then thishtmltag becomes HtmlServer control.<input type="file" />for<asp:FileUpload ID="upload" />. I don't see the problem.