Hello I am trying to upload a file from popup however its giving null to the file property.
Any advise?
Below is my sample code: NOTE: submit button is used from default popup form.
@using (Html.BeginForm("AddAttachment", "Attachment", FormMethod.Post, new { enctype = "multipart/form-data", id = "UploadFileForm" }))
{
Any advise?
Below is my sample code: NOTE: submit button is used from default popup form.
@using (Html.BeginForm("AddAttachment", "Attachment", FormMethod.Post, new { enctype = "multipart/form-data", id = "UploadFileForm" }))
{
<div class="row">
<div class="col-md-5">
<div class="form-group">
@Html.LabelFor(model => model.Title, new { @class = "" })
@Html.TextBoxFor(model => model.Title, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.Title)
</div>
</div>
<div class="col-md-5">
<div class="form-group">
@Html.LabelFor(model => model.DataFile, new { @class = "" })
@Html.TextBoxFor(m => m.DataFile, new { type = "file", name = "DataFile" })
@Html.ValidationMessageFor(m => m.DataFile)
</div>
</div>
</div>
}