Here Will go->
1)create div or span where you need to display the notification say div with id "divResult"
2)use following javascript to http request using jquery post method
<script type="text/javascript">
$(document).ready(function () {
window.setInterval(function () {
searchSearch('helo');
}, 5000);
});
function searchSearch(strVal) {
alert(strVal);
$.post("../HttpHandler/SearchAll.ashx", { 'id': '1', 'Status': strVal }, function (response) {
$('#divResult').html(response);
});
}
</script>
Observe above script there in $(document).ready where i am calling SearchSearch function for every 5seconds (5000 mili seconds=5 sec).
in SearchSearch function you can pass the UserId and check at backedn how manyRecords inserted for this userId.
NO in $.post(..../HttpHandler)
I am requesteing to this searchAll.ashx page which is http handler
and also passing the parameter values there u can pass userid
3)http Handler .ashx
in this file
The above request wil directly come to this methode where in context you can find the paramter values which you are passing in $.post() methode as Status fetch value
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
strStatus = context.Request("Status")
If strStatus = "Search" Then
End If
context.Response.ContentType = "text/plain"
context.Response.Write(strResult)
End Sub
where strResult is the variabble value you want to send back to request as response
Hope This may Help -Happy coding