ASP Installation Guide

1

Install ASP.NET Core

1Step 1

Go to this link: https://dotnet.microsoft.com/en-us/download

2Step 2

Download the .NET 9.0 version

2

Create new project

1Step 1

Open VSCode

2Step 2

In command palette, type: .NET: New Project and click it

3Step 3

Select: ASP.NET Core Web App (Model-View-Controller)

3

Create a page

1Step 1

Create a folder named wwwroot and add index.html

2Step 2

Inside the index.html add:

1<!DOCTYPE html>
2<html lang="en">
3<head>
4    <meta charset="UTF-8">
5    <meta name="viewport" content="width=device-width, initial-scale=1.0">
6    <title>ASP Page</title>
7    <style>
8        html, body {
9            margin: 0;
10            padding: 0;
11            height: 100vh;
12            width: 100vw;
13            overflow: hidden;
14            font-family: 'Inter', sans-serif;
15            display: flex;
16        }
17        .container {
18            flex: 1;
19            flex-direction: column;
20            display: flex;
21            height: 100%;
22            width: 100%;
23        }
24        .iframe {
25            width: 100%;
26            height: 100%;
27            border: none;
28            border-radius: 0.3rem;
29            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
30        }
31        h2 {
32            color: #343a40;
33            margin-bottom: 1rem;
34            text-align: center;
35        }
36    </style>
37</head>
38<body>
39    <div class="container">
40        <h2>Tetrons Editor</h2>
41        <iframe
42        src="https://staging.tetrons.com/editor/dist/editor-host.html"
43        width="100%" height="600"
44        style="border: none;"
45        allowfullscreen></iframe>
46    </div>
47</body>
48</html>
4

Edit Program.cs

1Step 1

In Program.cs add the following:

1var builder  = WebApplication.CreateBuilder(args);
2var app  = builder.Build();
3
4app.UseDefaultFiles(); // Looks for index.html
5app.UseStaticFiles(); // Enables serving from wwwroot
6
7app.Run();
5

Run the program

1Step 1

Run: dotnet run, or

2Step 2

Using live server, or

3Step 3

Directly open the html file from file explorer

Output Preview

Output Preview
Chatbot