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

  • SEARCH
  • Home
  • 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 9232003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:12:35+00:00 2026-06-18T06:12:35+00:00

In a post Yahoo, when attaching files, there is a button Attach more files

  • 0

In a post Yahoo, when attaching files, there is a button “Attach more files” when you press it, it becomes one field to insert the file.
Here is the code:

<a href = "javascript: addUploadFields ();" id = "attach_more"> Attach more files </ a>

How can i implement it MVC?

  • 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-18T06:12:36+00:00Added an answer on June 18, 2026 at 6:12 am

    After tyring many unsuccessful solution I got it from

    http://lbrtdotnet.wordpress.com/2011/09/02/asp-net-mvc-multiple-file-uploads-using-uploadify-and-jqueryui-progressbar/
    

    click this useful link

     I kept the Url Values in a session
    
    
    
     public JsonResult Upload(HttpPostedFileBase file)
        {
            if (Session["myAL"] == null)
            {
                al = new ArrayList();
            }
            else
                al = (ArrayList)Session["myAL"];
    
            var uploadFile = file;
    
                if (uploadFile != null && uploadFile.ContentLength > 0)
                {
                    string filePath = Path.Combine(HttpContext.Server.MapPath("~/Content/Uploads"),
                                                       Path.GetFileName(uploadFile.FileName));                    
                    al.Add(filePath);
                    Session["myAL"] = al;
                    uploadFile.SaveAs(filePath);
                }
    
            var percentage = default(float);
    
            if (_totalCount > 0)
            {
                _uploadCount += 1;
                percentage = (_uploadCount / _totalCount) * 100;
            }
    
            return Json(new
            {
                Percentage = percentage
            });
        }
    

    and then retrieved them in my Post Create Action

    public ActionResult MultimediaCreate(MultimediaModel newMultimedia)
        {            
            if (ModelState.IsValid)
            {
                db.submitMultimedia(newMultimedia);
                al = (ArrayList)Session["myAL"];
                foreach(string am in al)
                {
                    MarjaaEntities me = new MarjaaEntities();
                    MultimediaFile file = new MultimediaFile();
                    file.MultmediaId = newMultimedia.id;
                    file.MultimediaFileUrl = am;
                    me.MultimediaFiles.AddObject(file);
                    me.SaveChanges();
                    Session.Remove("myAL");
                }
                return RedirectToAction("MultimediaIndex");
            }
            return View();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

POST requests to server work fine until a file is attached. The form is
Post-release, I have made one small change to one form in our development site
post '/upload' do unless params[:file] && (tmpfile = params[:file][:tempfile]) && (name = params[:file][:filename]) return
Cross-post http://perlmonks.org/index.pl?node_id=979710 I'm trying to create a text file from some XML using Perl
first post here as I'm stuck with my wonderful C++ function. The error I'm
that is my first post I am trying here, to get the names of
I need to export the data from the yahoo group, Is there any API
I have a bunch of PSD files (and more to come) and I want
I'm writing a blog post that uses multiple videos from YouTube and Yahoo Video,
<form id=lol method=post action=? zidprofile=210 zmarked=true referer=http://yahoo.com/> <input type=text name=age value=22 /> <input type=text

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.