Let's say you have a business object:
public class Person {
public string FirstName {get;set;}
public string LastName {get;set;}
public Person(string firstName, string lastName) {
this.FirstName = firstName;
this.LastName = lastName;
}
}
I know that if you call a WebMethod that returns a Person object you can refer to its properties on the client by name. For example:
function onWebMethodSuccess(result) {
alert("Hello " + result.FirstName + " " + result.LastName);
}
But what if I want to pass a Person object as a parameter to a WebMethod?
Does the class Person have a proxy class created on the client like the WebService does? Can I do:
var p = new Person("Joe","Sandwich");
PersonService.CreatePerson(p, onSu ...
Go to the complete details ...