I'm about to create quite simple website which will contain several static pages (they will never change) and one dynamic change (let's call it news). I'was wondering whether it's possible to use MVC here without having to create controllers and views for these "static" pages. Isn't that just too much overhead?
Is there a way to make MVC simply route incoming requests to valid documents without actually having to create controller?
Just put your static content in a separate directory and link to it there. ASP.NET will simply serve up the static content as normal when the path is to a actual file. I created a static folder in my Content folder, but you could put it anywhere. The files could even live in the root of the site.
+-Content
+-images
+-static
+-about.html
+-info.html
+-styles
+-site.css
+-themes
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With