Code
Imports System.WebCode
Imports Microsoft.AspNet.SignalRCode
Namespace SignalRChatCode
Public Class NotificationHubCode
Inherits HubVB.NET
Public Sub Send(name As String, message As String)Code
' Call the broadcastMessage method to update clients.Code
Clients.All.broadcastMessage(name, message)Code
End SubCode
End ClassCode
End NamespaceHere is Startup.vb
Code
Imports Microsoft.AspNet.SignalRCode
Imports Microsoft.Owin.SecurityCode
Imports OwinCode
Imports Microsoft.OwinCode
'add the attribute hereCode
<Assembly: OwinStartup(GetType(SignalRTutorials.Startup))>Code
Namespace SignalRTutorialsCode
Public Class StartupCode
Public Sub Configuration(app As IAppBuilder)Code
'app.MapSignalR()Code
Dim hubConfiguration = New HubConfiguration()Code
hubConfiguration.EnableDetailedErrors = TrueCode
hubConfiguration.EnableJavaScriptProxies = TrueCode
app.MapSignalR("/signalr", hubConfiguration)Code
End SubCode
End Class End Namespacein home.aspx
Code
var NotificationHub = $.connection.NotificationHub;Code
NotificationHub.client.refresh = function (stock) {Code
//Just some tracing purposesCode
//console.log('Refresh method triggered successfully!');Code
//console.log(stock);Code
//Refresh the gridview with latest dataCode
$("#Gridview1").each(function (i) {Code
if ($(<code></code>this)[0].id == stock.ID) {Code
//highlight the row that has data changed then slowly fadeCode
$(this).attr('style', 'background-color: yellow;');Code
$(this).animate({ backgroundColor: 'white' }, 3000);Code
}Code
});Code
};Code
$.connection.hub.start().done(function () {Code
//Just to trace whether your browser successfully connected to SignalR hubCode
console.log('Connected to SignalR hub, connection ID = ' + $.connection.hub.id); })and the last in home.aspx.vb (i write this code after upload's code)
Code
Dim context = GlobalHost.ConnectionManager.GetHubContext(Of NotificationHub)()Code
Dim aTimer = New System.Timers.Timer(1000)Code
aTimer.Interval = 3000Code
aTimer.Enabled = TrueCode
context.Clients.All.refresh()i hope you can help me everyone.. thanks

Answers
Know the answer? Post it. Somebody with the same question will find it here.