I am trying to create HtmlInputFile controls on the fly.
Basically, the user will click a button to upload a file, a postback will happen and an input form should appear.
I want to make it so that they can click this for as many attachments as they want to send (I'll put limits in as needed, but for the purposes of getting this initial step working...)
the first HtmlInputFile control adds fine, which brings me to problem one: I attach a file and it won't post afterwards (I have the form configured to multipart).
the second problem is that the control disappears on postback and I can't have 2 of them.
If this is not doable I'll accept a solution that will let me upload attachments one a time and then relate them to the form that I'm uploading them from. (this is a form for 2 tables, an "attachment" table that stores the files which is related to another table that stores the "tickets".
thanks in advance!
Let me know if you need any more info. I've attached the snippet of code that creates and adds the control to the place holder.
private void AddAttachment_Click(object sender, EventArgs e)
IEnumerator IE = ((PlaceHolder)AddTicket.FindControl("AttachmentControls")).Controls.GetEnumerator();
HIF = (HtmlInputFile)IE.Current;
HIF = new HtmlInputFile();