//[HttpPost] //public ActionResult Index(HttpPostedFileBase postedFile) //{ // if (postedFile != null) // { // string path = Server.MapPath("~/QuestionIMG/"); // if (!Directory.Exists(path)) // { // Directory.CreateDirectory(path); // } // postedFile.SaveAs(path + Path.GetFileName(postedFile.FileName)); // ViewBag.Message = "File uploaded successfully."; // } // return View(); //} public JsonResult Add(QuestionEntities questionEntities) { QuestionBL topicBL = new QuestionBL(); return(Json(topicBL.SaveQuestion(questionEntities), JsonRequestBehavior.AllowGet)); }