The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
//My model:
public class Document
{
[Key]
public int DocID { get; set; }
public byte[] ImageData { get; set; }
}
public class ImageContext:DbContext
{
public DbSet
}
}
//Controller:
[HttpPost]
public ActionResult Edit(int id, Document d, HttpPostedFileBase file)
{
try
{
db.Entry(d).State = System.Data.Entity.EntityState.Modified;
db.SaveChanges();
return RedirectToAction("List");
}
catch
{
return View();
}
}
//My Edit View:
@Html.LabelFor(model => model.ImageData, new { @class = "control-label col-md-2" })
@Html.TextBoxFor(model => model.ImageData, new { type="file",name="file"})
I can add,delete image but cant edit...
What can i do ..help please..
Shibly SadikPosted Mar 7, 2015, 5:33 AM
Shibly SadikPosted Mar 7, 2015, 5:32 AM
Manish Kumar ChoudharyPosted Mar 7, 2015, 3:35 AM