Mit dem folgenden Markup aus meiner Sicht:Datei laden MVC
<form action="Categories/Upload" enctype="multipart/form-data" method="post">
<input type="file" name="Image">
<input type="submit" value"Save">
</form>
Und in meinem Controller:
public ActionResult Upload(FormCollection form)
{
var file = form["Image"];
}
Der Wert der Datei ist null
. Wenn ich es in einer anderen Ansicht versuche mit einem anderen Controller Controller und es funktioniert mit dem gleichen Code.
Ich habe VS2008 auf Vista, MVC 1.0.
Warum?
Malcolm
„niemand wird habe eine Antwort "- ??? –
Gut die 2 gegebenen Antworten tun nicht und ich setze Geld auf das niemand es SO löst. – Malcolm
Antwort ist eine, die ein Problem richtig löst – Malcolm