Good day!
I am lost! I have developed a page in Blazor with Bootstrap and thought that the outcome would be the same as when I did webforms. With webforms the page scaled and fitted the mobile device. With blazor that seems not to be the case. Example would highly be appreciatd! I did it on .net 8
Thanks!
Jaco

Sangeetha SRank #212 · 11.4K reputationPosted Jan 28, 2025, 5:40 AM EST
It sounds like you're encountering some challenges with responsive design in Blazor compared to WebForms. While both frameworks can use Bootstrap for styling, the way you implement responsiveness can differ.
Key Differences:
Example of Responsive Design in Blazor with Bootstrap:
Here’s a simple example of a responsive layout in Blazor:
@page \"\/responsive-example\" @* Import Bootstrap for styling *@ Responsive Design ExampleCard 1This is some example content.Card 2This is some example content.Card 3This is some example content.Tips for Ensuring Responsiveness:
col,row, etc.) to make your layout responsive.Tuhin PaulRank #7 · 71.9K reputationPosted Jan 28, 2025, 9:59 AM EST
Par -1
I understand your frustration with the scaling issue in Blazor. The key difference between Blazor and WebForms is how layout and responsiveness are handled. Blazor doesn’t automatically handle viewport scaling in the same way WebForms does, so you may need to manually adjust the layout.
Simple Blazor page using Bootstrap that scales properly on mobile devices
@page "/responsive-page" @* Add this in the section of _Host.cshtml or in your index.html (for Blazor WebAssembly) *@ @* It's necessary to set the viewport meta tag for responsiveness *@ Responsive Blazor Page Card 1 Some quick example text to build on the card title and make up the bulk of the card's content. Go somewhere Card 2 Some quick example text to build on the card title and make up the bulk of the card's content. Go somewhere Card 3 Some quick example text to build on the card title and make up the bulk of the card's content. Go somewhereThis tag is crucial for ensuring the page scales properly on mobile devices. Without this, the page may not respond well to different screen sizes.
Tuhin PaulRank #7 · 71.9K reputationPosted Jan 28, 2025, 10:16 AM EST
Part -2
The diagram clearly shows three main flows:
Jaco17 reputationPosted Jan 29, 2025, 1:20 AM EST
Hello Tuhin
Thank you for this. I just don't understand the different tags. Will it have like a zoom effect or perhaps organize controls from top to bottom?
Thanks a million!
Jaco