I don't believe you need a value property on objOpportunityCommunicator Try this:
var boolRes = Forecasting_UpdateOpportunities2.Save_Opportunity(objOpportunityCommunicator).value; On Oct 30, 5:05 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I am using VB.NET as codebehind in my project. > > I want to pass a complex object to server method from client side. > For this, I firstly defined that class in server side code. Then, I > created an instance of this object and passed it to client. I used > following code for this- > > <AjaxMethod()> _ > Public Function OpportunityComunicator_Create() As > OpportunityCommunicator > Dim objOpportunityCommunicator = New OpportunityCommunicator() > Return (objOpportunityCommunicator) > End Function > > The above code worked... Then, I wanted to change the values of this > object and pass it to server method. For this I used following code in > javascript- > > var boolRes = > Forecasting_UpdateOpportunities2.Save_Opportunity(objOpportunityCommunicator.value).value; > (Forecasting_UpdateOpportunities2 is the class name and > Save_Opportunity is my Ajax method at server side.) > > By above piece of code, the method is getting called, but it is not > getting the object. When I debug it, it shows the value of the object > (objOpportunityCommunicator) as Nothing. > Please tell a solution for this problem. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ajax.NET Professional" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/ajaxpro The latest downloads of Ajax.NET Professional can be found at http://www.ajaxpro.info/ Don't forget to read my blog at http://weblogs.asp.net/mschwarz/ The open source project is now located at http://www.codeplex.com/Wiki/View.aspx?ProjectName=AjaxPro -~----------~----~----~----~------~----~------~--~---
