I have two actions inside my controller (shoppingCartController)
    public ActionResult Index()
    {
        //some stuff here
        return View(viewModel);
    }
    public ActionResult AddToCart(int id)
    {
        return RedirectToAction("Index");
    }
Is there anyway to prevent the users from directly calling the index action by typing the url in the browser?
For example: If the user browses to shoppingCart/index be redirected to Home/Index.
 
     
     
     
     
     
     
     
     
     
     
    