How should you complete the relevant code segment?

DRAG DROP
You develop an ASP.NET MVC application. You plan to implement ASP.NET SignalR for real-time push
notifications. The application includes the following class:

You need to display the message.
How should you complete the relevant code segment? To answer, drag the appropriate code segment to the
correct location or locations. Each code segment may be used once, more than once, or not at all. You may
need to drag the split bar between panes or scroll to view content.
Select and Place:

DRAG DROP
You develop an ASP.NET MVC application. You plan to implement ASP.NET SignalR for real-time push
notifications. The application includes the following class:

You need to display the message.
How should you complete the relevant code segment? To answer, drag the appropriate code segment to the
correct location or locations. Each code segment may be used once, more than once, or not at all. You may
need to drag the split bar between panes or scroll to view content.
Select and Place:

Answer:

Explanation:
Box 1: $.hubconnection();
Create a connection.
Box 2: con.createHubProyxy(‘MyHub’);
Declare a proxy to reference the hub.
Box 3: hub.start()(‘function’, function(hello) {
Start the connection
https://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr



Leave a Reply 6

Your email address will not be published. Required fields are marked *


Muthukumar

Muthukumar

var connection = $.hubConnection();
var contosoChatHubProxy = connection.createHubProxy(‘contosoChatHub’);
chatHubProxy.on(‘addMessageToPage’, function (message) {
console.log(message.UserName + ‘ ‘ + message.Message);
});

EYAuditor

EYAuditor

var connection = $.hubConnection();
var contosoChatHubProxy = connection.createHubProxy(‘contosoChatHub’);
chatHubProxy.on(‘addMessageToPage’, function (message) {
console.log(message.UserName + ‘ ‘ + message.Message);
});