好的。上傳文件MVC
我在想我。我想如何將文件上傳到服務器上,但我無法解決。
我讓代碼,任何想法。
<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Cintas.Master" Inherits="System.Web.Mvc.ViewPage(Of iABC.Temp)" %>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolderContenido" runat="server">
<%=Html.ValidationSummary("Se produjeron errores al procesar la solicitud. Revise los errores e intente nuevamente.")%>
<% Using (Html.BeginForm("CargarArchivos", "ProcesosAutomaticos", FormMethod.Post, New With {.enctype = "multipart/form-data"}))%>
<input type="file" name="abc" id="abc" />
<input type="submit" value="Submit Button" />
<% End Using%>
</asp:Content>
<AcceptVerbs(HttpVerbs.Post)> _
Function CargarArchivos(ByVal abc As HttpPostedFileBase) As ActionResult
' But abc always is Nothing
' Continue code
End Function
問候。
任何錯誤? .... – 2011-01-11 22:06:34