❔ Trying to create my first non-tutorial ASP.net project running into small error

TLDR; take a look at last question I am using the tutorial model which has a page called "Privacy.cshtml" which just has
@page
@model PrivacyModel
@{
ViewData["Title"] = "Privacy Policy";
}
<h1>@ViewData["Title"]</h1>

<p>Use this page to detail your site's privacy policy.</p>
@page
@model PrivacyModel
@{
ViewData["Title"] = "Privacy Policy";
}
<h1>@ViewData["Title"]</h1>

<p>Use this page to detail your site's privacy policy.</p>
This works but when I create a copy called "PrivacyTest.cshtml" with
@model PrivacyTestModel
@model PrivacyTestModel
It says it cannot find it. When I hover over the other one it seems to think there is a file called aspDemo.Pages.Privacy but there is no file called Privacy in the Pages directory.
5 Replies
sea cryptid
sea cryptidOP2y ago
Looks like I found this but it wasn't in my solution explorer before?
sea cryptid
sea cryptidOP2y ago
Wait. bigthonk Can a file also be a folder?
sea cryptid
sea cryptidOP2y ago
sea cryptid
sea cryptidOP2y ago
I guess my question is now more about project structure.
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server