Hey, another newbie here, just playing with .NET MVC. My main task is to have several semi-static pages on URLs, for example:
- /about/
- / o / contacts /
- / o / work /
I use the controller for Static and connect the following route:
routes.MapRoute(
"About",
"about/{id}",
new { controller = "Static", action = "Index", id = UrlParameter.Optional }
);
Everything seems to be fine, since I have a Static controller with an Index method that uses the switch statement to determine which page to view. I am using the RedirectToAction () function to call other Static controller actions to display pages with other views. My views:
- /Static/About.aspx
- /Static/Contacts.aspx
- /Static/Jobs.aspx
, , // /Static/Contacts, , URL.
, : ? ?
,
~ K.