title: Toastr Notifications in Microsoft.AspNetCore.Mvc
body: <p>I'm using <strong>Toastr</strong> notification plugin in my <code>dotnetCore</code> razor application to display status messages. These notifications are working perfectly fine with all ajax calls and their responses (in javascript). </p>
  
  <p>But I need to configure these responses on simple razor actions;</p>
  
  <pre><code>asp-action="ViewJobs" asp-controller="Job"
  </code></pre>
  
  <p>Like if there's some loading issue or rights issue, I need to show error messages as <code>toastr</code> notifications. I did some RnD on it and found out different solutions but nothing worked out for me.</p>
  
  <p>I've tried <a href="http://labs.bjfocus.co.uk/2014/06/create-an-mvc-wrapper-for-toastr/" rel="nofollow noreferrer">MVC wrapper for Toastr</a> that handles all kind of toastrs in controller but its specific for MVC and trying to add some files in <code>App_Code</code> that is not available in <code>dotnetcore</code> and furthermore its having <code>@helper</code> tag that is no more supported in <code>dotnetcore</code>. <code>(Tell me if there's any other workaround to use this solution?)</code></p>
  
  <p>Then I tried this solution <a href="https://nabinked.com/2017/01/26/toast-notificationin-asp-net-core-mvc/" rel="nofollow noreferrer">NToastNotify</a> , but got stuck again, because it needs <code>Microsoft.AspNetCore.Mvc (&gt;= 1.1.2)</code> while I'm using <code>version 1.0.0</code> and I cannot update my version because then I need to update so many files in my project. </p>
  
  <p>So Is there any other solution to handle this situation?? Can't I fulfill my requirement with simple viewbag or tempdata ??</p>
  
  <p>Any kind of help will be appreciated. </p>