Hi,
I'm working on an ASP.Net MVC2 application and use the jsTree-Komponent for jQuery to render a tree with checkboxes.
To select specific nodes in a convenient way my JSON has to offer a "class" attribute. Here's an example how jsTree wants to consume the JSON result:
[{"data":"Root1","attr":{"id":"10","class" : "jstree-checked"} ...
In the controller I use "return Json(tree);" to create the Json and my ViewModel would than need a "class" property. A "class" property isn't allowed in C# as it is a reserved word.
Is there a way to Annotate the ViewModel's attribute as it is with XML? XMLExample:
[XmlAttribute("class")]
public string cssClass = "";
Or are there other suggestions to handle this on the server side?
Cheers, Helmut