Basically put, I have a MVC project and I just have the default route.
(Question edited as after testing and re-reading my question, I am sure the error is just because ints can not be null)
I have read complex answers on here about overloading, but if I want to have two different results for a page call, say one if it is null and the other if it is passed a request, is the following sufficient?
public ActionResult Details(int? id)
{
if(id != null)
id=1;
return View(id);
}
and then can this be extended to more complex situations such as public ActionResult Details(int? id, string bla, string bla2)
and just have a combination of null checks to return different views, or am I best implementing a solution such as on this answer.