using Microsoft.AspNet.SignalR; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace GMW_RT { public partial class TestSend : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btnSendAll_Click(object sender, EventArgs e) { // mando segnale a tutti i clients... #if false var context = GlobalHost.ConnectionManager.GetHubContext(); context.Clients.All.Send("Admin", "stop the chat"); #endif var hubContext = GlobalHost.ConnectionManager.GetHubContext(); hubContext.Clients.All.Send("Admin", "stop the chat"); txtMessage.Text = ""; txtMessage.Focus(); lblMess.Text = "Messaggio inviato!"; } } }