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