May 21, 2019 05:56 PM|DA924|LINK
Your help is needed, I have three types of ID's coming from different pages to the same Controller / Action.
Maybe, you should consider method overloading for the ActionMethod, which is a seperation of methods with the same method name, but the selection is made by .NET based on the signature to be used for the overloaded method.
public ActionResult Edit(int id = 0)
return id == 0 ? null : View(_projectModel.Edit(id));
public ActionResult Edit(ProjectViewModels.Project project, string submit)
if (submit == "Cancel") return RedirectToAction("Index");
if (ModelState.IsValid && _modelHelper.IsEndDateLessThanStartDate(project, "Project"))
ModelState.AddModelError(String.Empty, "End Date cannot be less than Start Date.");
if (!ModelState.IsValid) return View(_projectModel.PopulateSelectedList(project));
var theproject = new ProjectViewModels.Project();
theproject = project;
theproject.ProjectType = Request.Form["ProjectType"];