IJavaScriptConverter and class attribute

Michael Schwarz on Saturday, October 22, 2005

If you want to use a converter for your classes you can add the JavaScriptProvider attribute to your class that it will be used without the need of changing the web.config. This will allow developers to use components from third parties without changing their web.config.

[JavaScriptConverter(typeof(MyClassConverter))] public class MyClass { public MyClass() { // // TODO: Add constructor logic here // }

public int Age = 0; public string FirstName = "INITIAL"; }