0

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?

5
  • 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 Commented Feb 8, 2018 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. Commented Feb 8, 2018 at 17:02
  • i want to access to HTML pages. Commented Feb 8, 2018 at 17:24
  • @NnN thank you.This is my answer Commented Feb 8, 2018 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. Commented Feb 9, 2018 at 1:23

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

2 Comments

I cant reach pages in any folder except files in wwwroot folder
@eyvaz Put your HTML files in wwwroot and make sure you're using app.UseStaticFiles() in your Startup.cs.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.