public ActionResult Create() { var initialState = new JobAd { PublishFromDate = DateTime.Now.Date }; return View(initialState); }
public ViewResult Create(JobAd jobAd, string referer) { if (ModelState.IsValid) { ViewData["referer"] = referer; return View("BindingResults", jobAd); } else // Incoming data is invalid - redisplay the form return View(jobAd); }