Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
131 Points
108 Posts
Mar 29, 2012 03:35 PM|LINK
thanks. can you please give me a sample of custom route constraint? I have tried creating now a new route
routes.MapRoute( "clientweb", // Route name "{id}", // URL with parameters new { controller = "Client", action = "Index" } // Parameter defaults );
this works. but now accessing Home controller does not work anymore.
my final goal on the site is to give user a personal page in format http://mysite/clientname
that is why it is optional, as if not provided the default page is displayd.
kvh
Member
131 Points
108 Posts
Re: MapRoute with default parameter
Mar 29, 2012 03:35 PM|LINK
thanks. can you please give me a sample of custom route constraint? I have tried creating now a new route
routes.MapRoute(
"clientweb", // Route name
"{id}", // URL with parameters
new { controller = "Client", action = "Index" } // Parameter defaults
);
this works. but now accessing Home controller does not work anymore.
my final goal on the site is to give user a personal page in format http://mysite/clientname
that is why it is optional, as if not provided the default page is displayd.