Hello,
Click Here
My problem is in the Edit view, it gets all the information except the logo.. my edit get controller is :
// GET: Billers/Edit/5
public ActionResult Edit(string id, HttpPostedFileBase logo)
{
if (id == null)
{
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
}
Biller biller = db.Billers.Find(id);
if (biller == null)
{
return HttpNotFound();
}
return View(biller);
}
///THE VIEW
<div class="form-group">
@Html.LabelFor(model => model.Logo, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
<!--<input type="file" class="form-control" name="logo" accept="image/png,image/jpg,image/jpeg" />-->
@Html.EditorFor(model => model.Logo, new { htmlAttributes = new { @class = "form-control", type = "file", accept = "image/x-png, image/gif, image/jpeg" } })
@Html.ValidationMessageFor(model => model.Logo, "", new { @class = "text-danger" })
</div>
</div>
And when if i edit a textbox only and i save the modified fields, it save a null object in logo
Click Here