C
C#3mo ago
Cumet

✅ ASP.NET Web application (Framenetwork) with MVCs

hi, does anyone know how to connect the css file to a cshtml file in the project of the title?
No description
20 Replies
Angius
Angius3mo ago
What's "framenetwork"? And you use a CSS stylesheet like... you normally would, in any other plain HTML + CSS application For a /wwwroot/styles/style.css you would add a
<link rel="stylesheet" src="~/styles/style.css" />
<link rel="stylesheet" src="~/styles/style.css" />
into the header in your layout Maybe add asp-append-version="true" as well, for easy cache busting
Cumet
Cumet3mo ago
i cant find the root folder tho
Angius
Angius3mo ago
? What do you mean?
Cumet
Cumet3mo ago
No description
Angius
Angius3mo ago
Ah It's the ancient one
Cumet
Cumet3mo ago
whats the new one
Angius
Angius3mo ago
Yeah, I'm no archaeologist, I have negative knowledge about the old MVC The one without (.NET Framework) $newproject
MODiX
MODiX3mo ago
When creating a new project, prefer using .NET over .NET Framework, unless you have a very specific reason to be using .NET Framework. .NET Framework is now legacy code and only get security fix updates, it no longer gets new features and is not recommended. https://cdn.discordapp.com/attachments/569261465463160900/899381236617855016/unknown.png
Cumet
Cumet3mo ago
which one of them has mvcs
Angius
Angius3mo ago
The one without (.NET Framework) ASP.NET Core Web App Then it lets you choose between MVC, Razor Pages, WebAPI, etc
Cumet
Cumet3mo ago
No description
Cumet
Cumet3mo ago
what about this one
Angius
Angius3mo ago
Yes, this one's MVC
Cumet
Cumet3mo ago
u think i better use this one for my project?
Angius
Angius3mo ago
As you can see, Model-View-Controller If you want MVC, and don't want to be stuck in 2002, then sure
Cumet
Cumet3mo ago
i think ill switch to it then cant find anything about the ancient one on internet omg bruh im gonna need to do everything frm scratch again now 😦
Angius
Angius3mo ago
Some of the code can just be copy-pasted to the new project No biggie
Cumet
Cumet3mo ago
ok ill try thank u so much do u mind if i add u and dm u later if i get stuck ?
Angius
Angius3mo ago
I do mind, yes Feel free to ping me here though
Cumet
Cumet3mo ago
ok thx