Click here to Skip to main content
11,412,516 members (74,740 online)
Click here to Skip to main content

See latest additions to CodeProject from VS.NET Start Page

, 18 Jan 2004
Rate this:
Please Sign up or sign in to vote.
An article on customizing the VS.NET IDE with the latest Additions from Code Project

Click image to enlarge

Introduction

This article allows you to see the latest addition to the Code Project directly in your "Online Resources" on the Start Page of VS.NET

Background

See MSDN article Customizing the Visual Studio Start Page

Using the code

First step : Create a Virtual Directory in IIS (named CodeProjectDownload) . Then paste the content of the CodeProjectDownload.zip into this folder.

Test : Point your browser to the http://localhost/CodeProjectDownload/WebForm1.aspx : what you will see is a XML document

If not, please check your Internet connection and/or Code Security for Asp.Net

Second step : Locate your Visual Studio .NET installation folder and locate the \Common7\IDE\HTML\1033 folder ( usually : E:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\HTML\1033 - for other languages than English, please replace 1033 with your language code)

If not created, please create a folder named Custom - and put the contents of CodeProject.zip in this folder.

Now, run Microsoft Visual Studio .NET 2003 - go to Start Page , click on Online Resources. You will see a "Last Code Project added resources" item. Click on this item. And you will see the latest code addition for Code Project. ( see the image).

The important code is the one that downloads the XML and the one that interprets the XML

Uri u=new Uri(@"http://www.codeproject.com/webservices/articlerss.aspx"); 
HttpWebRequest hwr=(HttpWebRequest)HttpWebRequest.CreateDefault(u);
HttpWebResponse hwre=(HttpWebResponse)hwr.GetResponse();
Stream s= hwre.GetResponseStream();
Byte[] read = new Byte[512];
int bytes = s.Read(read, 0, 512);
StringBuilder sb=new StringBuilder();
while(bytes>0){
Encoding encode =Encoding.GetEncoding("utf-8");
sb.Append(encode.GetString(read,0,bytes));
bytes = s.Read(read, 0, 512); 
} 

XmlDataDocument xd=new XmlDataDocument();
xd.LoadXml(sb.ToString());
XmlNodeList xnl=xd.DocumentElement.GetElementsByTagName("item");
ItemCodeProjectCollection icpcol=new ItemCodeProjectCollection();
foreach(XmlNode xn in xnl){
ItemCodeProject icp=new ItemCodeProject();
icp.Title= xn.SelectSingleNode("title").InnerText;
icp.Description=xn.SelectSingleNode("description").InnerText;
icp.Url=xn.SelectSingleNode("link").InnerText;
icpcol.Add(icp.Url,icp);
}

The rest is in the method LinksStartPage that constructs the XML needed by the Start Page.

Points of Interest

The project can be the start to interpret others RSS feeds, like the ones on DevX

Also, the project can be simpler if the Code Project owners ( with a XSL) transform theirs XML to the specific XML that is recognized by Start Page.

History

  • 2004-01 - first draft.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

ignatandrei
Software Developer (Senior) Electronic Arts
Romania Romania
VB6(from VB3) addictive (MCP also) + ASP
Now trying C#
Database : SQL Server,DB2
Follow on   Twitter   LinkedIn

Comments and Discussions

 
GeneralVS.NET Start Page, Project Tab Pin
ariesinapril at 6-Jul-04 12:28
memberariesinapril6-Jul-04 12:28 
GeneralRe: VS.NET Start Page, Project Tab Pin
Anonymous at 6-Jul-04 19:36
sussAnonymous6-Jul-04 19:36 
As you can see from the page
http://www.codeproject.com/webservices/articlerss.aspx
you can add the author to the application. Unfortunately, you see from the link that category tag is empty ... so you must speak with CodeProject owner ...Smile | :)
GeneralAdditional info Pin
GaryH at 21-Jan-04 14:02
memberGaryH21-Jan-04 14:02 
GeneralRe: Additional info Pin
ignatandrei at 21-Jan-04 21:28
memberignatandrei21-Jan-04 21:28 
GeneralRe: Additional info Pin
GaryH at 22-Jan-04 7:25
memberGaryH22-Jan-04 7:25 
GeneralRe: Additional info Pin
ignatandrei at 22-Jan-04 21:09
memberignatandrei22-Jan-04 21:09 
QuestionC# needed? Will it work with Vis C++ .NET std? Pin
hgohel at 20-Jan-04 5:03
memberhgohel20-Jan-04 5:03 
AnswerRe: C# needed? Will it work with Vis C++ .NET std? Pin
ignatandrei at 20-Jan-04 6:25
memberignatandrei20-Jan-04 6:25 
GeneralRe: C# needed? Will it work with Vis C++ .NET std? Pin
hgohel at 20-Jan-04 6:39
memberhgohel20-Jan-04 6:39 
GeneralRe: C# needed? Will it work with Vis C++ .NET std? Pin
ignatandrei at 20-Jan-04 21:00
memberignatandrei20-Jan-04 21:00 
GeneralRe: C# needed? Will it work with Vis C++ .NET std? Pin
hgohel at 21-Jan-04 3:45
memberhgohel21-Jan-04 3:45 
GeneralRe: C# needed? Will it work with Vis C++ .NET std? Pin
ignatandrei at 21-Jan-04 3:48
memberignatandrei21-Jan-04 3:48 
GeneralRe: C# needed? Will it work with Vis C++ .NET std? Pin
hgohel at 21-Jan-04 4:03
memberhgohel21-Jan-04 4:03 
GeneralRe: C# needed? Will it work with Vis C++ .NET std? Pin
ignatandrei at 21-Jan-04 4:13
memberignatandrei21-Jan-04 4:13 
GeneralRe: C# needed? Will it work with Vis C++ .NET std? Pin
hgohel at 21-Jan-04 5:57
memberhgohel21-Jan-04 5:57 
GeneralNice Pin
chaldon at 13-Jan-04 0:21
memberchaldon13-Jan-04 0:21 
GeneralRe: Nice Pin
ignatandrei at 13-Jan-04 3:35
memberignatandrei13-Jan-04 3:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150427.1 | Last Updated 19 Jan 2004
Article Copyright 2004 by ignatandrei
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid