VisualBean
2/22/2017 - 7:31 PM

_layout.cshtml

<script>
...
 $.connection.hub.start()
        .done(function () {
            console.log('SignalR connected, connection id = ' + $.connection.hub.id);
            $.connection.toastHub;
        })
        .fail(function (data) {
            console.log('SignalR failed to connect: ' + data);
        });

    // METHOD CALLED FROM SERVER-SIDE
    $.connection.toastHub.client.showToast = function (type, content, title) {       
        toastr[type](content, title);
    };
...
</script>