c# - Single Controller for multiple pages -


i have url structures this

/home /about /contact /terms 

i dont want create separate controller foreach page. how work using single home controller? if make in single controller show url like

/home /home/about /home/contact /home/terms 

your global.asax responsible configuring routes, via registerroutes. can edit explicitly add own patterns or individual mappings. example:

routes.maproute(     "default", "{action}",      new { controller = "home", action = "index" } ); 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -