开发者

Generate Javascript intellisense file for a .NET Class

I have a .net control which is intended for use as an ActiveX control in web pages, instantiated thus:

开发者_运维技巧
<object id="TheControl" name="TheControl" classid="clsid:012937D0-E1D8-4a80-A17F-DEADBEEFF00D"></object>

Is there a way to take the XML documentation generated by Visual Studio for TheControl and transform it into a .js file that Visual Studio could then consume to provide intellisense for an instance of the control in a page?


You would either have to use .NET Reflection to get a list of all properties and methods, or write an XML parser tool to get the same list, and then generate .JS source code from it.

I think both of these would take about the same effort to write, but the Reflection approach can also be used with just the ActiveX file- if you don't have Visual Studio handy to generate the documentation XML.

If all you want is an "empty shell" .JS file for the properties and methods, then the code in this article should provide a good basis:

http://www.codeproject.com/KB/dotnet/Reflection.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜