I'm trying to populate dropdown in the aspx page using the datasource returned by a WCF service.
call from aspx through javascript:
function Initialize() { NameSpace.WCFClass.UserInfo(OnSuccess, OnFailure) } function OnSuccess(result) { var varResult = result; } function OnFailure(result) { var varResult = result; }
WCF Code(svc.cs file)
public Array UserInfo() { List<MyClass> lstUser = List<MyClass>(); // after reading the values return lstUser.ToArray(); }
It returns an array with values--works fine
Next thing is, it throws exception: OnFailure in the javascript: "The server method 'UserInfo' failed."
Thanks in advance