C# MVC表单,使用其他值填充输入标记
所以我有一个大的表格,它被分成几个部分。 为了简化这件事,每个部分都有用于上载文件的输入文件标记,以及附加到该部分的上一个文件的图像(图像为.png格式)C# MVC表单,使用其他值填充输入标记,c#,asp.net-mvc,file-upload,C#,Asp.net Mvc,File Upload,所以我有一个大的表格,它被分成几个部分。 为了简化这件事,每个部分都有用于上载文件的输入文件标记,以及附加到该部分的上一个文件的图像(图像为.png格式) 如何提交输入?它们是否位于同一表单中?您可以将输入拆分为不同的表单,也可以使用javascriptI do document.getElementById('mainform').submit()自行发送请求;我想要的是:当我用这个按钮提交整个表单时,只需在控制器中输入我在输入字段中引入的文件。为什么会在我的表单中发生这种情况? <ta
如何提交输入?它们是否位于同一表单中?您可以将输入拆分为不同的表单,也可以使用javascriptI do document.getElementById('mainform').submit()自行发送请求;我想要的是:当我用这个按钮提交整个表单时,只需在控制器中输入我在输入字段中引入的文件。为什么会在我的表单中发生这种情况?
<table>
<tr>
<td>
Upload Section Preview Image:
</td>
<td>
<div id="at-at-holder-N-TemplatePreview">
<input type="file" id="TemplateSectionPreview" name=@sectionScreenshotName title="Attach" />
</div>
</td>
</tr>
<tr>
<td>
<div class="section-panel">
<a href="#section-image-preview-@sectionId" role="button" data-toggle="modal"><img class="thumbnail" src="/Content/screenshots/@sectionScreenshotName" /></a>
<div id="section-image-preview-@sectionId" class="modal hide section-image-window">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<a href="#" class="close imager thumbnail" data-dismiss="modal"><img src="/Content/screenshots/@sectionScreenshotName" style="max-height: 500px; padding: 4px;" /></a>
</div>
</div>
</td>
</tr>
</table>
[HttpPost]
public ActionResult QuestionEditor(FormCollection collection)
{
...