Archives / 2003 / April
  • Code 2 Html Addin

    I am looking for an addin which can convert code to html from the VS.NET IDE. I found this [GenerateHTML.exe] but it works with the complete file, not with code segments.

    Is there any such tool available for free?


  • Why is your software popular?

    Sometimes, I think why I prefer one product over another. Is it because

    1. The product is based on latest technology?

    2. The product contains a lot of functionality and architectured with the best of design but nothing shows in front.?

    3. Or The product is the most user friendly?

    Number 3 is the key in my opinion. Well, you can say that I am not discovering anything new. I know that nothing is new, but most of us including myself  forget the significance of this. This is why Microsoft Windows and other Microsoft Products like Office are that much popular. I used OpenOffice for a while and despite the fact that it uses XML standard from version 1.0 I dumped it after a week. Just because after using it, I felt that I was alone in this world. It is not interoperable with Microsoft Office (which is used by all my friends and co-workers). Similar is the case with Linux and Windows. There are some cool GUIs build for Linux but there is no standard like Windows. 

    So, my point is clear. "Make your product user friendly". People will stick to your software , no matter how many security holes in there in your software or how many times it shows you the blue screen in a day :).

    Speaking of blue screen, I almost forgot it since I switched to Windows XP.


  • Visual XPath

    I recently posted a small utility to gotdotnet that started as my pet project. It is called Visual Xpath.

    What it does?

    - Run Xpath Queries on any Valid Xml document.
    - Show XML load time and Xpath query execution time.
    - Edit XML using the TreeView
    - Loading namespace automatically
    - Generating Xpath Queries automatically when you click on any of the XML tree node.
    - Generate basic source code in C#.

    Although you can download it from gotdotnet. But always contact me for more recent version.

    Note that this is just the basic version of Visual XPath. All other enhancements and bug-fixtures are only possible on your feedback.


  • "Subscribe to ..." from IE Context Menu

    As more and more Rss Aggregators display the feed into hosted IE control. I personally feel it very handy to Subscribe to Rss feed from the IE context menu, instead of the 3-step process of first copying then pasting and finally clicking the subscribe button. Some of the important pieces that you can use are.

    First you need to add an entry into registry (in actual scenerio it should be done using the setup builder). The Registry key is

    [HKCU]\Software\Microsoft\Internet Explorer\MenuExt\[Your text].

    In the default value, you need to specify the html file which is being used to handle/process the URL it receives. You are also required to define the context type. A context type denotes the resource on which you need your option to act upon. For e.g., we are only interested in handling right click on URLs. So, we specify the context value as 34(Hex 22) which is used for only hyperlinks.

    [Please let me know of any document(s) describing these context types.]

    The next step is to handle the URL into the html document you specified and Instantiate an object of your .NET component from JScript and call any public method. That should do the trick for you. To make your .NET component accessible from Jscript,  remember to “regasm” it with /codebase switch.

    I didn’t know about this until Adam Sills from DOTNET-CLR list point me into right direction.

    Create a .net DLL project. In the source file, write the following code. Change it to how you intend to use. Also create a strong name key for use with this file.


    using System;

    using System.IO;

    using System.Reflection;

    using System.Runtime.CompilerServices;


    [assembly: AssemblyKeyFile("pluginkey.snk")]

    [assembly: AssemblyKeyName("")]


    namespace AggiePlugin



                /// Summary description for Class1.


                public class MainClass


                            // A public constructor is necessary

                            public MainClass()




                            public void WriteToFile(string str)


                                        // str passed into this function is the URL, here I write it into a text file

                                        // which is then read from the Aggie interface and then automatically subscribed

                                        // to each URL found.

                                        Assembly currAsm = Assembly.GetAssembly(this.GetType());

                                        string filename = Path.GetDirectoryName(currAsm.Location) + @"\temp.tmp";


                                        // write the output to a temp file

                                        StreamWriter sWriter = new StreamWriter(filename, true);










    // note that there is a public default constructor

    // and assembly attribute are defined because of signing with strong name key

    // other methods are defined as public or private or whatever


    To be able to access the .net assembly from JS, we have to regasm it with the /codebase attribute.


     regasm /codebase filename.dll


    Write code into the JS file to create the object and access it.


    ' from VBScript

    set aggie = CreateObject("AggiePlugin.MainClass")


    call aggie.WriteToFile(external.menuArguments.event.srcElement)


  • Finally...I started

    I finally started this. I have been reading these blogs from sometime but never tried to be a part of it. Thanks Scott for providing me this opportunity.
    Well, what do I write here? My experiences with .NET, personal opinions, links/posts that I found interesting etc. etc.