public ActionResult Pic(FormCollection collection, HttpPostedFileBase parvandeh) { var _Bytes = new byte[parvandeh.ContentLength]; parvandeh.InputStream.Read(_Bytes, 0, parvandeh.ContentLength); dc.Admin_UpdatePic(Session["Username"].ToString(), _Bytes); ViewBag.Message = "Your profile picture updated"; return(View()); }