Website layout is not working in .NET Web Application

Harpreet Singh 21 Reputation points
2022-03-18T15:23:34.383+00:00

Hi,

I have created a website using a ASP.NET Web Application (.NET Framework). I have used ADO.NET Entity Data Model because I had used EF Desiner from databases then I installed EF 6 through manage nuggets packet and build was sucessfull also I used MVC 5 controller wirh view, using entity framework. After doing all this when I test my webpage using IIS Express it doesn’t show me any stylesheet on websiteit seems like css is not working can I get some help to solve this issue. I have attached pictures of my project files I see and the way webpage looks.

Thank you,

184605-9684ed90-37b2-4702-84ef-2fa1ab86de4c.jpeg

Developer technologies ASP.NET Other
0 comments No comments
{count} votes

Accepted answer
  1. AgaveJoe 30,126 Reputation points
    2022-03-21T14:31:46.637+00:00

    The first step is to look at the URL that caused the 404 and verify the file exist in the expected folder. Your original screenshot shows you only have the site.css in the Content folder. If you used the MVC template to create the project then you should see bootstrap css files too.

    185292-capture.png

    The default MVC template has the following files in the script folder.

    185219-capture.png

    It is not clear what happened. Maybe the files were deleted or moved??? You can always create a new MVC project and compare the differences with your project. Or perhaps explain what you are trying to do.

    If you moved the files then you must also update the BundleConfig.cs file to point to the new file locations.

    Bundling and Minification


4 additional answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2022-03-18T15:39:05.613+00:00

    use the browser debug tools. the most issue is CSS file not found, though it looks like the page has styles applied.


  2. Harpreet Singh 21 Reputation points
    2022-03-18T16:50:25.177+00:00

    It is fixed now it was missing jquery

    0 comments No comments

  3. Harpreet Singh 21 Reputation points
    2022-03-19T16:40:09.723+00:00

    Hi guys,

    I was missing jquery 3.4.1 and that’s what it was showing me when I inspected my webpage but I don’t know why it is still not loading css in my webpage. Can anyone help?184747-26bade38-4716-4339-928c-81a2f44e7a16.jpeg

    0 comments No comments

  4. AgaveJoe 30,126 Reputation points
    2022-03-19T19:05:57.363+00:00

    Use the browser's dev tools to make sure there are no 404 (Not Found) error when referencing the CSS files. We also see this symptom on this forum when upgrading Bootstrap without following the Bootstrap migration documentation.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.