in controller
[HttpPost]
public ActionResult Img(HttpPostedFileBase file)
{
if (!Directory.Exists(Server.MapPath("~/image")))
{
Directory.CreateDirectory(Server.MapPath("image"));
}
string name = file.FileName;
string path = Path.Combine(Server.MapPath("~/image"),name);
file.SaveAs(path);
return RedirectToAction("Exp");
}
[HttpPost]
public ActionResult Img(HttpPostedFileBase file)
{
if (!Directory.Exists(Server.MapPath("~/image")))
{
Directory.CreateDirectory(Server.MapPath("image"));
}
string name = file.FileName;
string path = Path.Combine(Server.MapPath("~/image"),name);
file.SaveAs(path);
return RedirectToAction("Exp");
}

