vendredi 30 janvier 2015

Data annotation into JSON?


I'm working on an AJAX data grid for MVC 4 web aplication and will be receiving data as a JSON result from the controller. So I'll be serializing the C# model object into javascript.


I need to mark some of the attributes as sortable and thought it'd be cool to use the Data Annotation. Of course there's no such thing in javascript, so that data would be lost after the serialization process. Is there any way to populate those attributes into JSON?


Regards


Lukasz





Aucun commentaire:

Enregistrer un commentaire