I am working through the book Visual C#.NET Step by Step, and I came to the section of the book where the author shows how to create comments on your code with XML.

///<summary>
///The obligatory Hello World in C#
///</summary>
///<remarks>
///This program writes out Hello World
///using the WriteLine method of the
///System.Console class.
///</remarks>

This is the code the author gives. You can use Visual Studio to Build Comment Web Pages, but none of the XML (specifically the things between the summary and remarks tags) show up. Is there something wrong with my version of VC#.NET?
I can't even get my browser to view XML created webpages. If I click on one of those orange XML boxes that are on some webpages, all I get is the XML coding. Is this suppose to happen? Am I missing something?

this is a great stuff to imorove our knowledge

I am working through the book Visual C#.NET Step by Step, and I came to the section of the book where the author shows how to create comments on your code with XML.

///<summary>
///The obligatory Hello World in C#
///</summary>
///<remarks>
///This program writes out Hello World
///using the WriteLine method of the
///System.Console class.
///</remarks>

This is the code the author gives. You can use Visual Studio to Build Comment Web Pages, but none of the XML (specifically the things between the summary and remarks tags) show up. Is there something wrong with my version of VC#.NET?
I can't even get my browser to view XML created webpages. If I click on one of those orange XML boxes that are on some webpages, all I get is the XML coding. Is this suppose to happen? Am I missing something?

I just ran into this problem a few days ago, and found a solution.

The problem occurred after I upgrade my system to Windows XP Service Pack 2. Internet Explorer suddenly started placing the Comment Web Pages in the Restricted zone, and there is no way to tell it to stop doing so. The reason is because each HTM file has <!-- saved from url=(0007)http:// --> as the first line of the document. For whatever reason, Internet Explorer is programmed to treat these files as Restricted documents, and not run any scripts contained within them.

The easiest solution is to do a search and replace on all of these files. From within Visual Studio .NET, Ctrl+Shift+F opens the Find In Files dialog. Choose your CodeCommentReport directory as the "Look In" directory. Have it look for "<!-- saved from url=(0007)http:// -->" and replace with "" (nothing). It will take a few minutes, but when it is complete, you should be able to view your code comment reports without error.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.