You should take a look at the previous article
Create an MVC wrapper for Toastr
It is clear that what you do from the server is a component that generates the dynamic javascript that injects into the view, is not doing anything of the other world, to launch the toast after the post to the server generates javascript from codig .net that injects into the view and reaches the browser
-
If you implement it by generating the server-side message, you will
need a submit to the action of the controller to launch the message
-
If you implement it as a client code then you should use ajax
to invoke the action that returns the info that indicates if you must
unfold toast or not
> > what is the correct way to implement this notification library?
There is not a correct way, it depends on how you want to implement it, whether with submit of the page or without this
As long as I use it, do not implement anything on the server side, only with a .js and .css and then code the client with javascript, jquery or angular making calls to the server through ajax