MVC4 link automatically redirected to default INDEX page/action even if defined action name with controller
- by Raj Tamakuwala
i am creating web mobile application in mvc4.
My problem is when I click on particular link in my application,it works well,
but sometimes it automatically redirected to INDEX page that is set as default page in global.asax as
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
Now I don't know why its automatically redirected to INDEX page,even if I have already defined controller and action name where it show redirected as,
<a href='@(Url.Action( "ActivityWall", "Home"))' > </a>
logically it should redirect to "ActivityWall" page,which it does.but sometime only it goes to INDEX page.then when I clear my cookie problem will again solved but after some time it again start redirecting to INDEX page.
I also posted question related to cookies issue yesterday,but I think that is nit main issue.
can someone help please ?