Click here to Skip to main content
15,890,717 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
insted of this url : www.mysite.com/Home/Login
home is the controller Login is the action .

I add string before the controller :www.mysite.com/MyClub/Home/Login

and for example when i type: www.mysite.com/MyClub/Home/HomePage

at first its goes to HomePage but after it goes to also to member/login -> the defualt in the route

but it stay on homePage

Can anyone pls help me on this?

What I have tried:

routes.MapRoute(
"Default", // Route name
"{club}/{controller}/{action}/{id}", // URL with parameters
new { club = "MyClub", controller = "Member", action ="Login", id = UrlParameter.Optional } // Parameter defaults
);
Posted
Updated 18-Jul-16 23:54pm

1 solution

HI Friend,

You are using extra one in your routing "{club}" so wherever you redirect from one controller to another controller or one page to another page you use club in you redirection in your MVC Project.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900