S
sonic
i am happy to report that serializing complex types into javascript and
passing it back to the server is effortless with atlas.
1. Create JavaScriptConverter
MyTypeJavaScriptConverter : JavaScriptConverter
you dont even have to override serialize/deserialize
this part appears to be taken care of automatically by
JavaScriptObjectSerializer static class
2. Create a WebMethod to pass back your type
public MyType CreateType() { return new MyType(); }
3. now you can call it from js using fully qualified name
Co.BusinessObject.MyWebService.createType( callbackFunc)
and you've got an instance.
4. use the instance to call anotehr webmethod that uses MyType as input
param.
my question is..
is calling a webservice the only way of creating an instance of MyType
on client?
for example, with available converters such as datatable / dataset.. is
it possible to create it on client w/out webservice call?
var ds = new DataTable(); etc...
passing it back to the server is effortless with atlas.
1. Create JavaScriptConverter
MyTypeJavaScriptConverter : JavaScriptConverter
you dont even have to override serialize/deserialize
this part appears to be taken care of automatically by
JavaScriptObjectSerializer static class
2. Create a WebMethod to pass back your type
public MyType CreateType() { return new MyType(); }
3. now you can call it from js using fully qualified name
Co.BusinessObject.MyWebService.createType( callbackFunc)
and you've got an instance.
4. use the instance to call anotehr webmethod that uses MyType as input
param.
my question is..
is calling a webservice the only way of creating an instance of MyType
on client?
for example, with available converters such as datatable / dataset.. is
it possible to create it on client w/out webservice call?
var ds = new DataTable(); etc...