Using datetime data type will cause your feed to fail validation. The trick here is to format the date to RFC822 specification by writing a funcion or subroutine.
Private Shared Function GetRfc822DateString _
(By Val dt As Date) As String
Return String.Format("{0:ddd}, {0:dd} {0:MMM} _
{0:yyyy} {0:HH} : {0:mm} : {0:GMT", _
dt.ToUniversalTime())
Call the function
xtw.WriteElementString("pubDate", GetRfc822_
DateString(dr("Date").ToString()))
Another problem is that XML feeds does not support character spaces in URL's. Fortunately ASP.NET gives us the URLEncode method which converts spaces to plus signs.
xtw.WriteElementString("link", _
http://www.yoursite.com/article.aspx?Title=" & _
Server.UrlEncode(dr("Title").ToString()))
To get the RSS icon to appear in the browser address bar copy and paste between the head tags of your page or master page. Make changes to the Url and Title to reflect your feed.
<link rel="alternate"title=""
href=http://www.yoursite.com/rss.aspx
type="application/rss+xml" />