'Razor Code not registering on only one cshtml file

enter image description hereI have an assignment that requires us to use a shared Layout, tag helpers, etc. The Razor code works fine on every page except for the confirmaccount page

Here is a page it is working fine on:

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@model bit285_assignment1_naps.Models.User;
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="/naps.css" />
    <title>Login Page</title>
</head>
<body>
    <h1>Login</h1>
    <fieldset>
        <form>
            <div>
                <label>Username</label>
                <input value="[email protected]" />
                <span>* required</span>
            </div>
            <div>
                <label>Password</label>
                <input type="password" value="bl-blue-Bansenauer" />
                <span>* required</span>
            </div>
            <div>
                <input type="button" value="Login" />
                <input type="button" value="Reset" />
            </div>
        </form>
    </fieldset>

</body>
</html>

And here is the problematic page:

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@model bit285_assignment1_naps.Models.User;
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="/naps.css" />
    <title>Account Confirmation</title>
</head>
<body>
    <h1>New Account Created</h1>
    <fieldset>
        <form>
            <div>
                <label>FirstName</label>
                <span>Brian</span>
            </div>
            <div>
                <label>Last Name</label>
                <span>Bansenauer</span>
            </div>
            <div>
                <label>Program</label>
                <span>Web App Dev</span>
            </div>
            <div>
                <label>Username</label>
                <span>[email protected]</span>
            </div>
            <div>
                <label>Password</label>
                <span>bl-blue-Bansenauer</span>
            </div>
            <div>
                <input type="button" onclick="location.href='/login.html';" value="Go to Login" />
                <input type="button" value="Reset" />
            </div>
        </form>
    </fieldset>

</body>
</html>

At the very least, on the latter, the VS is not recognizing it and the text is completely white.

The first file is login.cshtml, the second is confirmaccount.cshtml

I have no idea why the confirmaccount one is not working, the code @model/layout works fine for 5 other pages. Also, most of this code is premade by my instructor and not my original work.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source