Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

34 Comments

  1. The idea is great but it did not work when used with asp.net core 3.1
    I was not able to invoke and see the toast notifications

      1. When I run my web app locally, i.e. pressing F5, the notification works; however when I deploy the web app to Azure, the notifications don’t show at all.

          1. I built a sample application on .NET 5.0 Razor Pages and followed the same exact steps mentioned within this tutorial. It works as expected. Do check your code.
            Regards.

          2. $ is not defined /// Ahh, I guess there is a issue with your placement of @await Component.InvokeAsync(“Notyf”). Make sure you place this code after


            It says $ is not defined because my package is not able to find jQuery on you application as it has not loaded yet. make sure you add @await Component.InvokeAsync(“Notyf”) after the other js files are loaded. I am sure this would fix your issue.
            Regards

          3. Hello my friend
            Thanks for the good program you made

            I also have a Same problem.
            When I make a new project from .Net 6, it works without any problems.
            But after developing and adding different parts of the project(Like=UseCookiePolicy,UseAuthentication,UseAuthorization,…) , your program crashes.
            Displayed only after refreshing the screen.

          4. Hi Mukesh,
            I want to customize notify Like Add two button ( Ok and Details) but I have not found. How to customize notify and how to set width and height .

  2. If I try to notify with an object string value, notifier shows whole object as string.

    What Can I Do?

    1. Hi Mukesh, Thanks for great article and product. Do you have any sample on how to use notify or toast with ajax requests?

    2. webBuilder.ConfigureAppConfiguration((ctx, cb) =>
      {
      StaticWebAssetsLoader.UseStaticWebAssets(
      ctx.HostingEnvironment,
      ctx.Configuration);

      });

  3. Using .NET 5 with Bootstrap 4, toasts are working fine, but I am unable to use any of the Font Awesome icons. I attempt to pass in “fa fa-home” into the Custom method call, and no icon is shown.

  4. Hi Mukesh, Thanks for great article and product. Do you have any sample on how to use notify or toast with ajax requests?

  5. Hello,

    I found this package quite a good one to implement it to my site. I managed to follow all instructions so it was working perfectly – in development mode. Now, in production, thw following error pops up in web console while there are no notifications.
    Error:
    “Uncaught ReferenceError: Notyf is not defined. ”
    “jQuery.Deferred exception: notyf is not defined ReferenceError: notyf is not defined at toastNotifySuccess”

      1. Hello again,

        I have made a full review of the implementation process done and did not find mistakes. Confirming this, it works absolutely fine as expected in development mode – no console errors, notifications popping up correctly.
        After switching to production mode, these console errors appear
        https://gyazo.com/97d5d3f60ec0b1fb766c5c683cb7a92e
        https://gyazo.com/77884efcc57af4fd0b144948fa1e9956
        I suspect IIS server to block a remote call, but this should be like this, so I ran out of ideas.

    1. Hi guys,

      After some research, I finally found the solution for this issue.
      In order to trigger the notification you must have this inside of your ajax call:

      `error: function(jqXhr) {
      getResponseHeaders(jqXhr);
      }`

      Hope this helps you! 😎
      Best Regards

  6. How to set the notification in the tempData, so that I can display it in the next page after redirecting to other page?