i want to get all notifications with signal R and i want to fill drop-down list with all notifications coming from database...i received all notifications but when i display on drop-down...all are not in proper format ..these all are just like a single notification...
controller===>>>
public ActionResult GetMessages()
{
MessagesRepository _messageRepository = new MessagesRepository();
return PartialView("_MessagesList", _messageRepository.GetAllMessages());
}
View==>>>
function getAllMessages()
{
var tbl = $('#messagesTable');
$.ajax({
url: '/Home/GetMessages',
contentType: 'application/html ; charset:utf-8',
type: 'GET',
cache:'false',
dataType: 'html'
}).success(function (result) {
$.notiny({
text: 'New Notification Available You May Check',
animation_hide: 'custom-hide-animation 0.5s forwards'
});
tbl.empty().append(result);
}).error(function () {
});
}
_MessagesListpartial return?