skip to Main Content

I want to play with javascript and html and a bit more and would like to do so in Visual Studio. There is a very similar question here. The solution says I can can create an empty ASP.Net Web site and use that. But I can’t find a project template for an ’empty ASP.Net Web site’. The closest I get is ‘ASP.net core empty project’ and that uses c# and I can’t see how to get my html and javascript involved. How can I get this ’empty ASP.Net Web site’ or how can I use the ‘ASP.net core empty project’?

2

Answers


  1. ASP.Net always represents the backend, where your data come from and in "Views" you can just create normal html pages and of cause you can use Java script in there.

    HomeController

    public IActionResult Index()
    {
        return View();
    }
    

    And in Views you have a Index file in "Home". There you can start with your page, but data only comes from the C# code if you need data from the database.

    But my recommendation would be, if you just want to use html and javascript. Install VS Code and javascript via nvm and create a file index.html.

    Login or Signup to reply.
  2. As GrafiCode said. Create an empty ASP.Net website.

    enter image description here

    enter image description here

    The image above shows how to create an empty ASP.Net website. Hope it helps you.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search