【发布时间】:2012-12-29 16:07:30
【问题描述】:
在我看来,我有类似的东西:
@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"
可能有错误的路由?
【问题讨论】:
标签: model-view-controller sitefinity