0

I am trying to work out what is the best way in an MVC3 form to have an input on a form where you browse for a folder path, not a file.

If this was for a file I would do something like this, but what is the equivalent for a folder?

MODEL
public HttpPostedFileBase File { get; set; }
VIEW
@Html.TextBoxFor(m => m.File, new { type = "file" })  
2
  • What do you want to do with the folder? Commented Oct 8, 2012 at 17:37
  • my code will iterate over all files in the folder, selecting .JPEG ones and uploading them into a CMS. The code will run in an intranet were the server has access to the unc filepath specified. Commented Oct 9, 2012 at 7:06

1 Answer 1

1

There is not an HTML input for folder (only for individual files).

See How to take folder as a input in html? See also WC3 Forms

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.