MVC4 link automatically redirected to default INDEX page/action even if defined action name with controller
Posted
by
Raj Tamakuwala
on Stack Overflow
See other posts from Stack Overflow
or by Raj Tamakuwala
Published on 2012-10-18T04:52:30Z
Indexed on
2012/10/18
5:01 UTC
Read the original article
Hit count: 263
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 ?
© Stack Overflow or respective owner