This project is read-only.

Edit for uploading images to a database

May 29, 2013 at 12:20 AM
hello I have a web application of customer base with this action to edit:
         public ActionResult Edit (Record record)
             if (ModelState.IsValid)
                 if (Request.Files.Count> 0)
                     int length = (int) Request.Files [0]. InputStream.Length;
                     byte [] fname = new byte [size];
                     Request.Files [0]. (fname, 0, size);
                     byte [] arqUp = architect;
                     cadastro.foto = arqUp;
                     db.Entry (registration). = EntityState.Modified State;
                     db.SaveChanges ();
                     return RedirectToAction ("Index");
             ViewBag.coordenadorID = new SelectList (db.Coordenadors "coordenadorID", "Coordenadornome" cadastro.coordenadorID);
             ViewBag.liderID = new SelectList (db.Liders "liderID", "Nomelider" cadastro.liderID);
             ViewBag.supervisorID = new SelectList (db.Supervisors "supervisorID", "Nomesupervisor" cadastro.supervisorID);
             ViewBag.cargoID = new SelectList (db.Cargoes "cargoID", "Nomecargo" cadastro.cargoID);
             return View (registration);
when I do not alterations in the photo the client she is preserving the image in the database ... is sending null results for my db someone could help me I am new to programming
May 29, 2013 at 5:07 PM
Unfortunately, that question is really outside the scope of this forum :(. Try asking your question at They'll be able to help you pretty quickly over there