public ActionResult SiteSkinEdit(SiteSkinModel model) { if (ModelState.IsValid) { model.SaveFile(); if (!String.IsNullOrEmpty(model.AltPath)) { return RedirectToAction("SiteSkinEdit", new { @path = model.EncodedPath, @alt = model.EncodePath(model.AltPath) }); } return RedirectToAction("SiteSkinEdit", new { @path = model.EncodedPath }); } Helper.HandleErrorDict(ModelState); model.ReadRelated(); return View(model); }
public ActionResult SiteSkinEdit(string path, string alt) { SiteSkinModel model = null; if (String.IsNullOrEmpty(alt)) { model = new SiteSkinModel(path); } else { model = new SiteSkinModel(path, alt); } model.ReadFile(); return View(model); }