Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8573735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:19:06+00:00 2026-06-11T19:19:06+00:00

I have 1 question I don’t find an answer to. (MVC ): On the

  • 0

I have 1 question I don’t find an answer to.

(MVC ): On the main View I have loaded a PartialView into a Jquery UI dialog. I create something and I send everything to database on submit.In the form I have an input type=”file” with the “multiple” attribute which helps me to upload some photos

   ( <input type="file" multiple="") 

. I send a list of photos(HttpPostedFileBase) to database . The problem is I always receive a NULL list.

Q: What is the problem? I also have some Ajax code that doesn’t work.

Same code used at another controller which returns a View is working very well. I thinks it’s a problem with the dialog.

dialog code from the main view:

 $('#element').dialog({
        autoOpen: false,           
        modal: true,
        open: function (event, ui) {
            $(this).load('@Url.Action("AddCar", "Cars")', function (html) {                    
                $('form', "#sDiv").submit(function () {
                    $.ajax({
                        url: this.action,
                        type: this.method,
                        data: $(this).serialize(),
                        success: function (res) {
                            if (res.success) {
                                $('#element').dialog('close');
                            }
                            window.location.reload();
                        }
                    });
                    return false;
                });
            });
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:19:08+00:00Added an answer on June 11, 2026 at 7:19 pm

    You seem to be using AJAX to submit the form. But that’s not supported. You cannot upload files using jQuery AJAX functions. You may take a look at the jquery.form plugin which supports uploading files as well.

    There are 2 camps out there:

    1. HTML5 – supported by the modern browsers where you could use the File API to upload files with AJAX.
    2. The legacy camp – things like Internet Explorer which do not support the File API and in which you have to fallback to techniques such as hidden iframes and stuff to simulate it. That’s what the jquery.form plugin does – it detects on which camp belongs the browser and uses the appropriate technique

    There are also many other file upload components that you might checkout such as Uploadify, Plupload, Blueimp File Upload, Valums AJAX uploader, and other. Just pick one and integrate in your application if you don’t want to be coding all the underlying transport mechanisms.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question that I couldn't find the answer because I don't know
I have a question that I just don't feel like I've found a satisfactory
I have a question related to this one . I don't want to do
I don't know much css or html, so I have a question about taking
I have a really dumb question if you don't mind me to ask :(
I have been given the below .NET question in an interview. I don’t know
I don't know if this question has been ask before. But I have a
You guys probably don't understand my question, I'll try to explain further. I have
I don't know which title I should use for this question. I have a
Simple question... How am I going to reproduce Javascript bugs if I don't have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.