0
在我看來,我有這樣的:MVC(在SItefinity)
@model CreatorModel
<form name="myForm" action="/Creator/CreateAction" enctype="multipart/form-data" id="myForm" method="post">
<div class="a">
<h2 class="a">....</h2>
<div class="b">
<br />
Select a file for a <input type="file" name="aFile" id="aFile" />
<br /><br />
Select a file for b<input type="file" name="bFile" id="bFile" />
<br /><br />
<input type="submit" id="CreateAction" name="CreateAction" value="CreateAction" />
</div>
</form>
但我有一個錯誤:File /Creator/CreateAction is not found (CreateAction is an action from CreatorController)
有什麼可以爲行動<form...>
,以便找到行動我進入從控制器?
當我使用這個語法:
@using (Html.BeginForm("FileUpload", "Board", FormMethod.Post, new { enctype = "multipart/form-data" })) { <input type="file" /> <input type="submit" /> }
我也有一個錯誤:A reference is not set to an instance of an object"
也許有一個錯誤的路由?