Пример #1
0
 public ActionResult Create()
 {
     var initialState = new JobAd
     {
         PublishFromDate = DateTime.Now.Date
     };
     return View(initialState);
 }
Пример #2
0
 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);
 }