Return value from WebMethod to javascript getting undefined error?
here iam using webmethod call in js file like
GetFields(fieldName, _ID, myEditor.onGetFieldsCompleted, myEditor.onGetFieldsFailed);
webservice.cs file [WebMethod]
public string[] GetFields(string mergeFieldName, Int32 PartnershipID)
{
string[] stringArray = (string[])fields.ToArray(typeof(string));
return stringArray ;
}
here from webservice we are returning string array to javascript ......at tht time iam getting reult in javascript as undefined error ......pls see below js file code ........
onGetFieldsCompleted = function (result)----------here in result iam getting undefined.....actualy i have to get string array whcih i returned from webmethod in result but iam getting undefined in result...............
{
if (result != null) {
if(result.length > 0) {
}
else {
}
}
pls help me out.......