public ActionResult CheckImage() { string value; ImageCoder img = new ImageCoder(); byte[] bytes = img.GetImageByte(out value); Session["ImgCode"] = value; return(File(bytes, "image/png")); }