userContext is not defined error message

I received this message while creating my first ASP.NET AJAX web service.

The call to the asyncronise method has changed from (userparameters, onComplete, onTimeOut, onError) to (userparameters, onSuccess, onFail, userContext).

Obviously this is an improvement as you can now track userContext of the Webservice calls.

To fix the above message make sure you are defining your userContext even if it is null. For example:

 <script language="javascript" type="text/javascript">

 var userContext1;       

 WebContentFlow.AJAX.ContentflowAJAXAPI.BuildPage("String parameter",onSuccess,onFailed,userContext1)      

 function onSuccess(result,userContext,sender)        {            alert(result);        }        

 function onFailed(result)        {            alert("Failed request >"  + result.get_message());       

}  

Posted on 12/17/2007 9:01:00 AM by Ryan Dissell

Permalink | Comments (0) | Post RSSRSS comment feed |

Categories: Dot.Net 3.5

Tags: ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

September 5. 2008 16:31