❔ cshtml bootstrap razor pages, Toasts not showing up?

so i am making this webpage with the help of bootstrap. and untill now everything worked, but i am trying to get a toast but it just wont show up, even copied the code of the docs https://getbootstrap.com/docs/5.2/components/toasts/
Toasts
Push notifications to your visitors with a toast, a lightweight and easily customizable alert message.
4 Replies
WantToBeeMe
WantToBeeMeOP2y ago
<div class="toast" style="autohide: false;" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<img src="..." class="rounded me-2" alt="...">
<strong class="me-auto">Bootstrap</strong>
<small>11 mins ago</small>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div class="toast-body">
Hello, world! This is a toast message.
</div>
</div>
<div class="toast" style="autohide: false;" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<img src="..." class="rounded me-2" alt="...">
<strong class="me-auto">Bootstrap</strong>
<small>11 mins ago</small>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div class="toast-body">
Hello, world! This is a toast message.
</div>
</div>
this is what they used, exept the style="autohide: false;" but they also said you were supose to add that for them to show up but without that its just simply a copypast that also doesnt work
Angius
Angius2y ago
You got the necessary Javascript? Also, are you sure you're using version 5 of Bootstrap?
WantToBeeMe
WantToBeeMeOP2y ago
Yea, i updated it to 5.2 indeed But let me have a look at the script, maby thats the case, totally posible
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server