If given the route:
{FeedName}/{ItemPermalink}
ex: /Blog/Hello-World
If the item doesn\'t exist, I want to return a 404. What is the
We do it like so; this code is found in BaseController
///
/// returns our standard page not found view
///
protected ViewResult PageNotFound()
{
Response.StatusCode = 404;
return View("PageNotFound");
}
called like so
public ActionResult ShowUserDetails(int? id)
{
// make sure we have a valid ID
if (!id.HasValue) return PageNotFound();