Author: themasterpiece83 | Posted on: 6/16/2008 11:25:04 PM | Views : 482

in JavaScript use call like

function OnPageLoad()

{ 

NameSpaceName.ClassName.FunctionName(......Arguments......, FunctionNameAfterReturnToBeExecuted);

}

on Service

[WebMethod(EnableSession = true)]

public string FunctionName(..arguments..)

{

Bind Json string with JsonObjectCollection and JsonArrayCollection and return the object as String();

}

 

on JS

function FunctionNameAfterReturnToBeExecuted(result)

{

if(result != null)

{

  var JsonObject = eval('('+ result +')');

  for(var i = 0; i < JsonObject.JSONArrayName.length; i++)

  {

      var JsonItem = JsonObject.JSONArrayName[i];

                    //now use the Item to render page as in ...

Go to the complete details ...