I am creating a web application with asp.net core that has a lot of pure HTML pages without any functionality.
How do I add these pages to the application? Should I create an action method for each page?
Asked
Active
Viewed 722 times
0

LordWilmore
- 2,829
- 2
- 25
- 30

eyvaz
- 161
- 1
- 8
-
either as HTML pages, or as views. Up to you and how you want to use them or access them. There's no right answer – ADyson Feb 08 '18 at 16:55
-
pure html pages are fine, but why you are looking for action methods? as per @Amy, go with separate folder in your solution for static html files. – NnN Feb 08 '18 at 17:02
-
i want to access to HTML pages. – eyvaz Feb 08 '18 at 17:24
-
@NnN thank you.This is my answer – eyvaz Feb 08 '18 at 17:40
-
I don't believe this should be marked as duplicate as it is tagged with `asp.net-core`. The duplicate answer is for ASP.NET MVC from 4 years ago and may not apply. – Brad Feb 09 '18 at 01:23
1 Answers
0
Create a folder within Views folder where you are going to place your html pages, PlainHTML for example. Then when you run your application you can go to ~/PlainHTML/View.html

Josue Martinez
- 436
- 5
- 14
-
-
@eyvaz Put your HTML files in `wwwroot` and make sure you're using `app.UseStaticFiles()` in your `Startup.cs`. – Brad Feb 09 '18 at 01:23