I’m using Web Service to handle ajax request in my project. I need to call a server side function to count users online when a new request is proceed.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to call Server side method into Client side then,you have to transform this method as a PageMethod and then call this method i.e
GetOnlineUser()from client side code; i.e. using JavaScript.To enable the method as a PageMethod, add the attribute
[WebMethod]on top of the GetOnlineUser method in .aspx code behind file.if you are using asp.Net membership provider then simply call
Membership.GetNumberOfUsersOnline().And if you are not using membership you have to implement your own custom counter…