i invoke url:
www.example.com/home/brand1 but have resulting url be:
www.example.com/brand1 i want multiple brands. know can have action in home controller each brand redirects brand controller don't want controller each brand. imagine can routing don't know how.
routes.maproute( "default", "{brandname}", new { controller = "home", action = "yourbrandaction", brandname = "" } ); // inside registerroutes method //your controller public class homecontroller : controller { [httpget] public actionresult yourbrandaction(string brandname) { //your controller logic... return view(yourbrandmodel); } } you must careful above route configuration. urls, e.g. www.example.com/login not direct login page treat 'login' brand name.
Comments
Post a Comment