开发者

MVC form with parametars:

I use fileuploader Jquery, I tried to form defined as follows:

<Form enctype="multipart/form-data" action="<%:Url.Action("Edit","Ticket")%>" method="post" >

using

(Html.BeginForm("Edit","Ticket",  new { ticketOnEdit = Model }, FormMethod.Post, new { enctype = "multipart/form-data" })){}

Each of these ways is defined html form:

<form class="MultiFile-intercepted" method="post" action="21359" id="form1">

I do not have a parameter:

encty开发者_JS百科pe="multipart/form-data"

How to solve a given problem, if someone can let me show what went wrong?


The following will generate the correct form:

<% using (Html.BeginForm("Edit", "Ticket", new { ticketOnEdit = Model }, FormMethod.Post, new { enctype = "multipart/form-data" })) { %>
    ...
<% } %>

Like this (assuming of course default routes):

<form action="/Ticket/Edit" enctype="multipart/form-data" method="post">
    ...
</form>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜