r'' Text=''获得RSS''></asp:Button><BR>
<BR>
<asp:Label id=''RssFeed'' runat=''server''></asp:Label></P>
后台代码:
/// <summary>
/// 获得要显示的Feed种子数据
/// </summary>
/// <param name=''RssUrl''></param>
/// <param name=''showNewsCount''></param>
/// <returns></returns>
public string LoadRSS(string RssUrl, int showNewsCount)
{
string strRssList = '''';
string strMsg;
try
{
XmlDocument objXMLDoc = new XmlDocument();
objXMLDoc.Load(RssUrl);
XmlNodeList objItems = objXMLDoc.GetElementsByTagName(''item'');
if(showNewsCount > 30)
showNewsCount = 10;
if(showNewsCount < 1)
showNewsCount = objItems.Count;
string title='''';
string link='''';
int i;
if(objXMLDoc.HasChildNodes == true)
{
i = 1;
foreach(XmlNode objNode in objItems)
{
if(i<=showNewsCount)
{
if(objNode.HasChildNodes == true)
{
XmlNodeList objItemsChild = objNode.ChildNodes;
foreach(XmlNode objNodeChild in objItemsChild)
{
switch(objNodeChild.Name)
{
case ''title'':
title = objNodeChild.InnerText;
break;
case ''link'':
link = objNodeChild.InnerText;
  |