Hi,
Normal C# code behind methods, you cant access from AJAX or Jquery. So we need to create method with attribute '[webmethod]'
Ex:
[Webmethod]
Public static void chatHeartbeat()
{
string items = "";
items = items + "\"s\":\"0\",\"f\":\"{" + message.userfrom.ToString() + "}\",\"m\":\"{" + message.message + "}\"";
HttpContext.Current.Response.Write("{ ");
Response.Write("\"items\":[" + items + "]");
HttpContext.Current.Response.Write(" }");
Response.End();
}
So now u you can access from any where.
thank you.