I'm trying to submit data to a web service in my project. The data's in the form of several fields, so I'd rather create a single object and submit that. I know I can submit it as a JSON object, but I thought I'd seen code somewhere that would create a C# object on the JS side so that I could submit it to the web service.
Am I crazy, or what does this JS code look like?
Just to get everyone on the same page example-wise, let's say the C# class would look like this:
namespace NSTest
{
[Serializable]
public class ClassTest
{
public string ClassName;
public int ClassValue;
}
}
And the web service would look like this:
namespace NSTest
{
public class WebServiceTest
{
[WebMethod]
public void WSFunc(ClassTest test)
{
...
}
}
}