上传提交中的问题 [英] Upload problem in submit
本文介绍了上传提交中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好每个身体我在我的项目中用html形式使用bootstrap向导,在里面我使用mvc Html.BeginForm并且我发布数据并且工作正常没有任何问题,除非我添加多个上传器我总是得到它空文件,但发布其他数据是好的,当我删除html表单标签,它上传工作,但向导停止这是我的试用,如果有任何建议
什么我试过了:
hello every body i have used bootstrap wizard in my project with html form and inside it i used mvc Html.BeginForm and i post data and works fine there is no any problem except when i add apart of multi uploader i always get it null files but post the other data is OK when i remove html form tag it upload works but the wizard stopped this is my trial if there any suggestion
What I have tried:
<div class="tabbable-line tabbable-full-width" id="form_wizard_1">
<form class="form-horizontal" action="#" id="submit_form" method="POST">
<div class="tab-content">
<div class="alert alert-danger display-none">
<button class="close" data-dismiss="alert"></button> text
</div>
<div class="row profile-account">
<div class="col-md-3">
<ul class="ver-inline-menu tabbable margin-bottom-10">
<li class="active">
<a data-toggle="tab" href="#tab1">
upload
</a>
<span class="after"> </span>
</li>
</ul>
</div>
@using (Html.BeginForm("Home", "postdata", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
@*@Html.ValidationSummary("", new { @class = "text-danger" })*@
<div class="tab-pane" id="tab1">
<div class="row">
<div class="col-md-12">
<div class="m-heading-1 border-green m-bordered">
<h3>add files</h3>
</div>
</div>
</div>
<div class="m-heading-1 border-after-green-steel m-bordered" style="margin-top:20px;">
@for (int i = 0; i < 4; i++)
{
@Html.TextBoxFor(x => x.files, new { type = "file", @class = "form-control" })<br />
}
</div>
</div>
}
</div>
</div>
</form>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-offset-3 col-md-9" style="margin-top: 20px;">
<a href="javascript:;" class="btn default button-previous">
back
</a>
<a href="javascript:;" class="btn btn-outline blue button-next">
go on
</a>
<button type="submit" class="btn blue button-submit">
save
</button>
</div>
</div>
</div>
推荐答案
I have solved it by removing html form and add the button inside of mvc form
这篇关于上传提交中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文