Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Posting a file as a property of a bigger object ASP.NET MVC3 [Solved (Kind Of)]

Posting a file as a property of a bigger object ASP.NET MVC3 [Solved (Kind Of)]

Scheduled Pinned Locked Moved ASP.NET
csharpquestionasp-nethelp
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sentenryu
    wrote on last edited by
    #1

    So, i've exausted my sources for search without any success. I currently have a Web Application that works as a quiz engine (i hope that's the correct translation) in where the administrator can enter Questions and options for answers, including predefined ones (that generate a list of radio buttons or checkboxes), calculated ones (no problem here) and free-text ones. now, the need arraived for a medical quiz that has one question that requires the user to include a file in the answer. currently, when the page that displays the quiz form is posted, the controller receives the following structure: Form -form fields - question collection - Question -question fields //i neeed the attachment to go here, on the question object - options collection there's any way i can get this? as the structure isn't constant (as in i don't even know what types of options will be sent back, their quantities or even if i need a attachment) I can't receive a IEnumerable<HttpPostedFileBase> on the controller, so i don't see any options here.... EDIT: acidentally posted the question while i was writing it, sorry.

    I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

    S 1 Reply Last reply
    0
    • S Sentenryu

      So, i've exausted my sources for search without any success. I currently have a Web Application that works as a quiz engine (i hope that's the correct translation) in where the administrator can enter Questions and options for answers, including predefined ones (that generate a list of radio buttons or checkboxes), calculated ones (no problem here) and free-text ones. now, the need arraived for a medical quiz that has one question that requires the user to include a file in the answer. currently, when the page that displays the quiz form is posted, the controller receives the following structure: Form -form fields - question collection - Question -question fields //i neeed the attachment to go here, on the question object - options collection there's any way i can get this? as the structure isn't constant (as in i don't even know what types of options will be sent back, their quantities or even if i need a attachment) I can't receive a IEnumerable<HttpPostedFileBase> on the controller, so i don't see any options here.... EDIT: acidentally posted the question while i was writing it, sorry.

      I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

      S Offline
      S Offline
      Sentenryu
      wrote on last edited by
      #2

      I just found that the reason my files aren't being posted is that i was using JQuery Ajax, that formated the response with the wrong content-type. as of my search, there's no way to do this by ajax.

      I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups