0

tl:dr -> User notification system on website. Can you avoid the need to call a javascript script to render notifications after ajax loads? (a base view that calls it would work, but there are no base views afaik)

I am looking for a way to add a User Notification System to my website. Such system would be responsible for displaying messages like 'Import success', 'Import failed', 'Session timed out' etc.

I know similar questions have been answered before, but here's my question:

  • How should I do it to get as close as possible to having the notifications display themselves as soon as possible after being put to TempData? Having them rendered on _layout page would work, but only for requests that ask for whole page. What about loading only parts of website through ajax -> can I avoid having to write JS script in ajax callbacks or partial views? I am looking for something to prevent writing multiple calls to same function.
Ismail Yk
  • 65
  • 2
  • 7

1 Answers1

0

Toastr is your notification Friend. Demo Page

you can install it from Nuget Install-Package toastr

See my SO question - for reference

Community
  • 1
  • 1
swapneel
  • 3,061
  • 1
  • 25
  • 32