0

Before anyone asks, I need to support IE8 for various reasons. I've seen multiple solutions to this that stick a file upload control inside a form element and then utilise an iframe to simulate an AJAX file upload(Such as How to make Asynchronous(AJAX) File Upload using iframe?). However, in a Webforms project where you cannot have multiple form tags and I don't want to post the entire page, what is the best solution?

Cheers

Stewart

Community
  • 1
  • 1
Stewart Alan
  • 1,521
  • 5
  • 23
  • 45

1 Answers1

0

I think if I correct you on one thing you already have the answer to your problem in the link you shared.

You can have only one server-side form, that does not mean you can not have a another html form on the page. Simply add one more form without runat=server tag.

Hope this helps.

Shashank Chaturvedi
  • 2,756
  • 19
  • 29
  • Doh. Schoolboy error. Of course. I have a further question though. I am submitting my form to an http handler, which is then saving the binary data of the uploaded file to a database and I need to then return the database record ID back to the page. Is this possible in this scenario or will I need to make a subsequent ajax call to retrieve this data in the iframe load handler? – Stewart Alan Mar 08 '14 at 22:02
  • I think if you use response.write on the page to which you are posting your form to, that would appear in your iframe. Please let me know if this is not clear. – Shashank Chaturvedi Mar 09 '14 at 18:47