1
I have a question about the application ASP.Net MVC
:
Structure
Views
|
+-- Home
| |
| +-- Index.cshtml
| |
| +-- Page.cshtml
|
+-- Users
| |
| +-- Details.cshtml
|
+-- Paginas
| |
| +-- Pagina1.cshtml
| |
| +-- Pagina2.cshtml
|
+-- Shared
|
+-- Layout.cshtml
|
+-- _Partial.cshtml
A normal structure, but the folder "Pages" has no controller that makes the association. In this folder I’ll put all the pages that are "Html Statics".
That is if I create a new file "Pagina3.cshtml" and put in this folder, and when I access the url {local}\paginas\Pagina3
the contents of this page appear, but when I do this returns a 404 error.
I just don’t want to create files .html
by using the Layout.cshtml
.
Create a standard controller to handle these static files
– Henrique Barcelos
Use pages really static (HTML even) is out of the question?
– Andre Calil
@Andrecalil the problem with using static pages is that I won’t be able to use Layout.cshtml
– Tiago
@Tiago: Use the method
HandleUnknownAction
as I indicated in my reply... this method exists for this purpose.– Miguel Angelo