Ok take this example below,
public ActionResult ViewProfile()
{
//Load the profile for the currently logged in user
if (Membership.GetUser() != null)
{
//Do some stuff get some data.
return View(ReturnViewModel);
}
return RedirectToAction("MainLogon","Logon");
}
Is there anyway to avoid the !magic strings" when redirecting to the Logon page?