Sunday, February 23, 2014

Using FileUpload with JQuery Mobile

One of the more irritating situations I've come across with JQuery Mobile is using ASP.FileUpload control. Whenever you hit submit to upload a file, the FileUpload control doesn't get the file. Basically, you end up with an empty string when it tries to save. I finally was able to figure it out after doing some digging around in the JQuery Mobile API. The below example shows what needs to be set to allow the FileUpload control to work.


In order to allow your FileUpload control work, you'll need to set data-ajax="false" where ever your form tag is located.

 
<form data-ajax="false" id="form1" runat="server">
</form>

No comments:

Post a Comment