<div id="snackbar"  class="toast" style="position: absolute; top: 1%; right: 1%;">
    <div class="toast-header">
        <strong class="mr-auto">@ViewData["ErrorTitle"]</strong>
        <button type="button" class="btn-close me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
    </div>
    <div class="toast-body">
        @ViewData["Error"]
    </div>
</div>    
@if (ViewData["Error"] is not null)
{
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
    <script>
         const snackBar = document.getElementById('snackbar');
         const toast = new bootstrap.Toast(snackBar)
         toast.show();
    </script>
}