public async Task <ActionResult> Post(CODE.PostModel model) { string username = ""; if (User != null) { username = User.Identity.Name; } model.GetType().GetCustomAttributes(false); if (!ModelState.IsValid) { return(View()); } else { List <string> f = await dal.PostAd(model, username); Session["lstImg"] = f; Session["PostModel"] = model; } return(RedirectToAction("PostMessage")); }
public async Task <ActionResult> PostMessage() { CODE.PostModel pst = (CODE.PostModel)Session["PostModel"]; ViewBag.PostMessage = "Your ad is Posted and appeard on ad listings"; return(View(pst)); }