Why Bootstrap doesn't work in my deployed site?

Posted 63 days ago by lingo1357
Edited 63 days ago
0

Hello,

I noticed in my Blazor sites Bootstrap doesn't work(on the host). Even I deployed the Microsft sample page for Blazor and uploaded it, even there Bootstrap doesn't work!

I should mention there is no index file in my published files! an I don't know the reason!

you can see the screenshot:

https://drive.google.com/file/d/1ndgb9Bh5BJH-tp_vR5vpfhWcr8BFgyh2/view?usp=sharing


Do you think what should be the reason? the site: mangoscarf.com

thanks,

  • 0

    It sounds like you must not have the Bootstrap files referenced properly. Based on your previous questions, it sounds like you're using Blazor Server, so you won't see an index file in your compiled assemblies. Make sure your _Host.cshtml file (in your Pages folder of your Server project) is correctly pointing to your bootstrap files. In your head area, make sure this exists:

    <link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />

    Then make sure bootstrap.min.css exists in your project at wwwroot/css/bootstrap/bootstrap.min.css

    You could also try referencing a Bootstrap CDN in your _Host.cshtml file: https://getbootstrap.com/docs/4.6/getting-started/introduction/

    Posted 62 days ago by selliott
  • 0

    Thanks for the reply but when I published the Microsoft sample for blazor even that file doesn't work with bootstrap and messed up!

    Posted 61 days ago by lingo1357
Someone is typing...

Post a Reply

You must be logged in to add a new post.
Number of online users: 0
An error has occurred. This application may no longer respond until reloaded. Reload 🗙