C
C#9mo 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
Angius9mo 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
CumetOP9mo ago
i cant find the root folder tho
Angius
Angius9mo ago
? What do you mean?
Cumet
CumetOP9mo ago
No description
Angius
Angius9mo ago
Ah It's the ancient one
Cumet
CumetOP9mo ago
whats the new one
Angius
Angius9mo ago
Yeah, I'm no archaeologist, I have negative knowledge about the old MVC The one without (.NET Framework) $newproject
MODiX
MODiX9mo 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
CumetOP9mo ago
which one of them has mvcs
Angius
Angius9mo ago
The one without (.NET Framework) ASP.NET Core Web App Then it lets you choose between MVC, Razor Pages, WebAPI, etc
Cumet
CumetOP9mo ago
No description
Cumet
CumetOP9mo ago
what about this one
Angius
Angius9mo ago
Yes, this one's MVC
Cumet
CumetOP9mo ago
u think i better use this one for my project?
Angius
Angius9mo ago
As you can see, Model-View-Controller If you want MVC, and don't want to be stuck in 2002, then sure
Cumet
CumetOP9mo 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
Angius9mo ago
Some of the code can just be copy-pasted to the new project No biggie
Cumet
CumetOP9mo ago
ok ill try thank u so much do u mind if i add u and dm u later if i get stuck ?
Angius
Angius9mo ago
I do mind, yes Feel free to ping me here though
Cumet
CumetOP9mo ago
ok thx
Want results from more Discord servers?
Add your server