Hi everyone, i tried to follow the example given in
http://www.ajaxpro.info/Examples/Classes/default.aspx but i found it
impossible to do, here's what i have done:
----------------------------------------------------
Server side code:
public class server
{
[Ajax.AjaxMethod()]
public void StepAdd(TestClass tc)
{
Response.Write(tc.name);
}
[Ajax.AjaxMethod()]
public TestClass NewInstance()
{
return new TestClass();
}
}
[Serializable()]
public class TestClass
{
public string name = "javier";
public TestClass()
{
}
}
----------------------------------------------------
Client side code:
function Testing()
{
var TC = server.NewInstance().value;
TC.name = "nicolas";
var response = server.StepAdd(TC);
}
----------------------------------------------------
I'll explain a little what i'm tying to do:
I'm gettin an instance of the class TestClass (TC), then i change the
name to "nicolas". Up to here, it's working ok, but when i try to pass
the object to the ajax method "StepAdd", it just doesn't work. I tried
lots of things, but i couldn't make it work.
I will appreciate any of yor help
--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---