You need to use
regasm, which allows .net classes to be used like COM classes, to register your dll, and in your Javascript, just do this:
var classInstanceVar=new ActiveXObject("NamespaceName.ClassName");
to instantitate your class. Then you can manipulate the instance, object-orientedly