asp.net制作RSS订阅功能 实例源码

来源:互联网 发布:dota臂章数据 编辑:程序博客网 时间:2024/04/28 18:48

本站的实例RSS订阅文档如下:
http://www.jiamaocode.com/JmRss/
 
 
 
折叠XML/HTML 代码
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">  
  3.   <channel>  
  4.     <title>::家猫编程社区::</title>  
  5.     <link>http://www.jiamaocode.com</link>  
  6.     <description>::家猫编程社区::</description>  
  7.     <language>zh-cn</language>  
  8.     <pubDate>Sun, 25 Apr 2010 22:19:24 GMT</pubDate>  
  9.     <lastBuildDate>Sun, 25 Apr 2010 22:19:24 GMT</lastBuildDate>  
  10.     <docs>http://www.jiamaocode.com/JmRss</docs>  
  11.     <generator>::家猫编程社区::</generator>  
  12.     <managingEditor>haofefe@163.com</managingEditor>  
  13.     <webMaster>haofefe@163.com</webMaster>  
  14.     <ttl>28</ttl>  
  15.     <item>  
  16.       <title>C#中不需要.NET邮件类支持的邮件发送程序(含SMTP源代码) 转</title>  
  17.       <link>http://www.jiamaocode.com/Pros/1050.shtml</link>  
  18.       <description>这是一个脱离.NET平台的邮件类(System.Web.Mail)发送源代码,程序实现了一个SMTP服务组件,同时还做了一个Web服务,你可以直接通过HTTP发送邮件。实现语言是C#。</description>  
  19.       <pubDate>Fri, 16 Apr 2010 09:30:40 GMT</pubDate>  
  20.       <category>C#</category>  
  21.       <author>jiamao</author>  
  22.       <guid>http://www.jiamaocode.com/Pros/1050.shtml</guid>  
  23.     </item>  
  24.     <item>  
  25.       <title>C#画图工具源码</title>  
  26.       <link>http://www.jiamaocode.com/Pros/1014.shtml</link>  
  27.       <description>早期学习.net中GDI时做的工具,翻出来给大同学们看看,记得有回滚操作的,这个不知道为什么没了!</description>  
  28.       <pubDate>Wed, 14 Apr 2010 16:06:17 GMT</pubDate>  
  29.       <category>C#</category>  
  30.       <author>jiamao</author>  
  31.       <guid>http://www.jiamaocode.com/Pros/1014.shtml</guid>  
  32.     </item>  
  33.     <item>  
  34.       <title>VB.net Rs232 通讯 COM口 通讯类代码</title>  
  35.       <link>http://www.jiamaocode.com/Pros/1010.shtml</link>  
  36.       <description>近来给同学做毕业设计,哈哈,有点不厚道,没办法谁叫是老朋友呢,,,现贴出来给大家分享..   
  37.   
  38. 把COM口的2,3线短接可以测试,一般是五线的为1,3,5,7,9;;;四线的为2,4,6,8</description>  
  39.       <pubDate>Tue, 13 Apr 2010 21:19:44 GMT</pubDate>  
  40.       <category>VB/VB.net</category>  
  41.       <author>jiamao</author>  
  42.       <guid>http://www.jiamaocode.com/Pros/1010.shtml</guid>  
  43.     </item>  
  44.     <item>  
  45.       <title>查看本机端口使用工具</title>  
  46.       <link>http://www.jiamaocode.com/Pros/1009.shtml</link>  
  47.       <description>C#写的查看本机端口使用工具   
  48. 代码不是很好,早期学习用的</description>  
  49.       <pubDate>Tue, 13 Apr 2010 20:05:57 GMT</pubDate>  
  50.       <category>C#</category>  
  51.       <author>jiamao</author>  
  52.       <guid>http://www.jiamaocode.com/Pros/1009.shtml</guid>  
  53.     </item>  
  54.     <item>  
  55.       <title>复合表头和合并行的DataGridView</title>  
  56.       <link>http://www.jiamaocode.com/Pros/1003.shtml</link>  
  57.       <description>本实现方法为网上流传最广的方法,本人做了一些修改,修正一些可能出现的BUG.复合表头 合并行 DataGridView</description>  
  58.       <pubDate>Mon, 12 Apr 2010 14:50:27 GMT</pubDate>  
  59.       <category>C#</category>  
  60.       <author>jiamao</author>  
  61.       <guid>http://www.jiamaocode.com/Pros/1003.shtml</guid>  
  62.     </item>  
  63.     <item>  
  64.       <title>漂亮的TAB控件</title>  
  65.       <link>http://www.jiamaocode.com/Pros/1038.shtml</link>  
  66.       <description>默认的TAB控件太难看,利用图片做了个漂亮的。</description>  
  67.       <pubDate>Sat, 10 Apr 2010 10:53:17 GMT</pubDate>  
  68.       <category>C#</category>  
  69.       <author>jiamao</author>  
  70.       <guid>http://www.jiamaocode.com/Pros/1038.shtml</guid>  
  71.     </item>  
  72.     <item>  
  73.       <title>.NET编译工具</title>  
  74.       <link>http://www.jiamaocode.com/Pros/1037.shtml</link>  
  75.       <description>基于调用msbuild devenv等工具的编译工具</description>  
  76.       <pubDate>Fri, 09 Apr 2010 22:10:30 GMT</pubDate>  
  77.       <category>开发工具</category>  
  78.       <author>jiamao</author>  
  79.       <guid>http://www.jiamaocode.com/Pros/1037.shtml</guid>  
  80.     </item>  
  81.     <item>  
  82.       <title>Silverlight连连看剑三篇</title>  
  83.       <link>http://www.jiamaocode.com/Pros/1022.shtml</link>  
  84.       <description>主要学习一下silverlight的的基础知识,会用的动画,图片和音乐的处理。</description>  
  85.       <pubDate>Tue, 06 Apr 2010 10:32:17 GMT</pubDate>  
  86.       <category>Silverlight</category>  
  87.       <author>jiamao</author>  
  88.       <guid>http://www.jiamaocode.com/Pros/1022.shtml</guid>  
  89.     </item>  
  90.     <item>  
  91.       <title>C#音频采集</title>  
  92.       <link>http://www.jiamaocode.com/Cts/1066.shtml</link>  
  93.       <description>C# directx 音频 采集</description>  
  94.       <pubDate>Sun, 25 Apr 2010 22:18:39 GMT</pubDate>  
  95.       <category>C#</category>  
  96.       <author>jiamao</author>  
  97.       <guid>http://www.jiamaocode.com/Cts/1066.shtml</guid>  
  98.     </item>  
  99.     <item>  
  100.       <title>搭建vs2008环境 下载安装 和破解</title>  
  101.       <link>http://www.jiamaocode.com/Cts/1065.shtml</link>  
  102.       <description>搭建vs2008环境 下载安装 和破解</description>  
  103.       <pubDate>Fri, 23 Apr 2010 15:54:29 GMT</pubDate>  
  104.       <category>开发工具</category>  
  105.       <author>jiamao</author>  
  106.       <guid>http://www.jiamaocode.com/Cts/1065.shtml</guid>  
  107.     </item>  
  108.     <item>  
  109.       <title>让整个浏览器全屏灰的javascript</title>  
  110.       <link>http://www.jiamaocode.com/Cts/1064.shtml</link>  
  111.       <description>让整个浏览器全屏灰的javascript   
  112. ,可以做出模式窗口</description>  
  113.       <pubDate>Thu, 22 Apr 2010 22:45:04 GMT</pubDate>  
  114.       <category>Asp.Net</category>  
  115.       <author>jiamao</author>  
  116.       <guid>http://www.jiamaocode.com/Cts/1064.shtml</guid>  
  117.     </item>  
  118.     <item>  
  119.       <title>asp.net下做一个类似visual studio边上自动隐藏的工具栏</title>  
  120.       <link>http://www.jiamaocode.com/Cts/1063.shtml</link>  
  121.       <description>利用脚本和样式,做一个VS自动隐藏工具栏.</description>  
  122.       <pubDate>Thu, 22 Apr 2010 15:00:11 GMT</pubDate>  
  123.       <category>Asp.Net</category>  
  124.       <author>jiamao</author>  
  125.       <guid>http://www.jiamaocode.com/Cts/1063.shtml</guid>  
  126.     </item>  
  127.     <item>  
  128.       <title>http:405 Method   not   allowed 异常的解决办法</title>  
  129.       <link>http://www.jiamaocode.com/Cts/1062.shtml</link>  
  130.       <description>405 Method not allowed   
  131. 调用webservice抛出这个错误的可能解决办法</description>  
  132.       <pubDate>Thu, 22 Apr 2010 12:07:39 GMT</pubDate>  
  133.       <category>Asp.Net</category>  
  134.       <author>jiamao</author>  
  135.       <guid>http://www.jiamaocode.com/Cts/1062.shtml</guid>  
  136.     </item>  
  137.     <item>  
  138.       <title>win7 IIS 配置和ASP.NET的运行配置</title>  
  139.       <link>http://www.jiamaocode.com/Cts/1061.shtml</link>  
  140.       <description>win7 IIS 配置和ASP.NET的运行配置</description>  
  141.       <pubDate>Thu, 22 Apr 2010 11:28:31 GMT</pubDate>  
  142.       <category>开发工具</category>  
  143.       <author>jiamao</author>  
  144.       <guid>http://www.jiamaocode.com/Cts/1061.shtml</guid>  
  145.     </item>  
  146.     <item>  
  147.       <title>兼容火狐与IE等各浏览器的颜色渐变脚本</title>  
  148.       <link>http://www.jiamaocode.com/Cts/1060.shtml</link>  
  149.       <description>兼容火狐与IE等各浏览器的渐变脚本   
  150. 用javascript实现的渐变效果.可以兼容各浏览器</description>  
  151.       <pubDate>Wed, 21 Apr 2010 21:44:09 GMT</pubDate>  
  152.       <category>Asp.Net</category>  
  153.       <author>jiamao</author>  
  154.       <guid>http://www.jiamaocode.com/Cts/1060.shtml</guid>  
  155.     </item>  
  156.     <item>  
  157.       <title>win7与win2008激活工具(可激活32位和64位)</title>  
  158.       <link>http://www.jiamaocode.com/Cts/1059.shtml</link>  
  159.       <description>Oem7之前所有版本皆成功通过微软正版验证    
  160. </description>  
  161.       <pubDate>Wed, 21 Apr 2010 18:25:01 GMT</pubDate>  
  162.       <category>其它</category>  
  163.       <author>jiamao</author>  
  164.       <guid>http://www.jiamaocode.com/Cts/1059.shtml</guid>  
  165.     </item>  
  166.     <item>  
  167.       <title>让网页全灰的CSS样式</title>  
  168.       <link>http://www.jiamaocode.com/Cts/1058.shtml</link>  
  169.       <description>让网页全灰的CSS样式</description>  
  170.       <pubDate>Tue, 20 Apr 2010 21:03:35 GMT</pubDate>  
  171.       <category>Asp.Net</category>  
  172.       <author>jiamao</author>  
  173.       <guid>http://www.jiamaocode.com/Cts/1058.shtml</guid>  
  174.     </item>  
  175.     <item>  
  176.       <title>Silverlight跨域访问Web服务</title>  
  177.       <link>http://www.jiamaocode.com/Cts/1057.shtml</link>  
  178.       <description>跨域通信是通过在其他域的根部署使用正确跨域策略文件的 Web 服务,可以在该域中启用基于 Silverlight 的应用程序要调用的 Web 服务</description>  
  179.       <pubDate>Mon, 19 Apr 2010 11:16:54 GMT</pubDate>  
  180.       <category>Silverlight</category>  
  181.       <author>jiamao</author>  
  182.       <guid>http://www.jiamaocode.com/Cts/1057.shtml</guid>  
  183.     </item>  
  184.     <item>  
  185.       <title>自已写的AJAX代码来访问后台服务</title>  
  186.       <link>http://www.jiamaocode.com/Cts/1056.shtml</link>  
  187.       <description>不使用各种ajax框架,直接写脚 本来方问后台服务</description>  
  188.       <pubDate>Sun, 18 Apr 2010 10:38:02 GMT</pubDate>  
  189.       <category>Asp.Net</category>  
  190.       <author>jiamao</author>  
  191.       <guid>http://www.jiamaocode.com/Cts/1056.shtml</guid>  
  192.     </item>  
  193.     <item>  
  194.       <title>Google与微软为jQuery等类库提供CDN服务</title>  
  195.       <link>http://www.jiamaocode.com/Cts/1055.shtml</link>  
  196.       <description>Google与微软为jQuery等类库提供CDN服务</description>  
  197.       <pubDate>Fri, 16 Apr 2010 13:35:39 GMT</pubDate>  
  198.       <category>Asp.Net</category>  
  199.       <author>jiamao</author>  
  200.       <guid>http://www.jiamaocode.com/Cts/1055.shtml</guid>  
  201.     </item>  
  202.     <item>  
  203.       <title>JavaScript输入框只允许输入字母和数字的方法</title>  
  204.       <link>http://www.jiamaocode.com/Cts/1054.shtml</link>  
  205.       <description>用一个特别简单的正则表达式方法就可以解决只允许输入字母和数字,这样就限制了中文的输入。尤其在一些注册用户名的时候,要求只能是字母和数字。</description>  
  206.       <pubDate>Fri, 16 Apr 2010 13:33:53 GMT</pubDate>  
  207.       <category>Asp.Net</category>  
  208.       <author>jiamao</author>  
  209.       <guid>http://www.jiamaocode.com/Cts/1054.shtml</guid>  
  210.     </item>  
  211.     <item>  
  212.       <title>CKEditor 3.2.1下载(最好的可视化HTML编辑器)</title>  
  213.       <link>http://www.jiamaocode.com/Cts/1053.shtml</link>  
  214.       <description>CKEditor就是当年风光的FCKeditor,支持多种开发语言,支持多种浏览器,用户量最大,功能最强!是网页开发人员首选可视化HTML编辑器,哈哈。</description>  
  215.       <pubDate>Fri, 16 Apr 2010 13:22:09 GMT</pubDate>  
  216.       <category>Asp.Net</category>  
  217.       <author>jiamao</author>  
  218.       <guid>http://www.jiamaocode.com/Cts/1053.shtml</guid>  
  219.     </item>  
  220.     <item>  
  221.       <title>禁止页面鼠标右键和选择的方法(支持Firefox和IE浏览器)</title>  
  222.       <link>http://www.jiamaocode.com/Cts/1052.shtml</link>  
  223.       <description>禁止页面鼠标右键和选择的方法(支持Firefox和IE浏览器),这个方法是最简洁最有效的方法了。</description>  
  224.       <pubDate>Fri, 16 Apr 2010 13:17:31 GMT</pubDate>  
  225.       <category>Asp.Net</category>  
  226.       <author>jiamao</author>  
  227.       <guid>http://www.jiamaocode.com/Cts/1052.shtml</guid>  
  228.     </item>  
  229.     <item>  
  230.       <title>播放器的下载进度与播放进度效果示例</title>  
  231.       <link>http://www.jiamaocode.com/Cts/1049.shtml</link>  
  232.       <description>播放器的下载进度与播放进度效果示例,如果要做播放器时好用.   
  233. </description>  
  234.       <pubDate>Thu, 15 Apr 2010 15:40:14 GMT</pubDate>  
  235.       <category>Silverlight</category>  
  236.       <author>jiamao</author>  
  237.       <guid>http://www.jiamaocode.com/Cts/1049.shtml</guid>  
  238.     </item>  
  239.     <item>  
  240.       <title>Silverlight动态调用WEBSERVICE,WCF方法</title>  
  241.       <link>http://www.jiamaocode.com/Cts/1048.shtml</link>  
  242.       <description>首先要引用WEB服务。。   
  243.   
  244. 第二个是动态调用WCF服务。。差不太多   
  245.   
  246. 这种方法调用比较简单,,可以从配置信息中读取上面的SERVICE地址</description>  
  247.       <pubDate>Thu, 15 Apr 2010 12:52:42 GMT</pubDate>  
  248.       <category>C#</category>  
  249.       <author>jiamao</author>  
  250.       <guid>http://www.jiamaocode.com/Cts/1048.shtml</guid>  
  251.     </item>  
  252.     <item>  
  253.       <title> ASP.NET 4.0 中 Menu 控件的改进 </title>  
  254.       <link>http://www.jiamaocode.com/Cts/1047.shtml</link>  
  255.       <description>Visual Studio 2010 对控件呈现进行了优化,使其更符合W3C规范和Web开发的潮流,下面,我就拿Menu控件做个测试,在Visual Studio 2010中,Menu控件添加了RenderingMode   
  256.   
  257. 属性,可以设置呈现的方式,有Default、Table、List3种方式,既可以呈现为表格,也可以呈现为列表,默认就是以列表的方法呈现。</description>  
  258.       <pubDate>Wed, 14 Apr 2010 20:14:34 GMT</pubDate>  
  259.       <category>Asp.Net</category>  
  260.       <author>jiamao</author>  
  261.       <guid>http://www.jiamaocode.com/Cts/1047.shtml</guid>  
  262.     </item>  
  263.     <item>  
  264.       <title>.NET4.0 String.IsNullOrWhiteSpac</title>  
  265.       <link>http://www.jiamaocode.com/Cts/1046.shtml</link>  
  266.       <description> .NET4.0新功能之String.IsNullOrWhiteSpace() 方法</description>  
  267.       <pubDate>Wed, 14 Apr 2010 20:13:25 GMT</pubDate>  
  268.       <category>C#</category>  
  269.       <author>jiamao</author>  
  270.       <guid>http://www.jiamaocode.com/Cts/1046.shtml</guid>  
  271.     </item>  
  272.     <item>  
  273.       <title>ASP.NET4.0 新功能之 SEO 增强</title>  
  274.       <link>http://www.jiamaocode.com/Cts/1045.shtml</link>  
  275.       <description>    * Page类的新属性:Page.MetaKeywords 和 Page.MetaDescription;   
  276.     * ASP.NET Web Forms 新的URL路由功能;   
  277.     * Response.RedirectPermanent()、Response.RedirectToRoutePermanent()方法等。   
  278. </description>  
  279.       <pubDate>Wed, 14 Apr 2010 20:11:38 GMT</pubDate>  
  280.       <category>Asp.Net</category>  
  281.       <author>jiamao</author>  
  282.       <guid>http://www.jiamaocode.com/Cts/1045.shtml</guid>  
  283.     </item>  
  284.   </channel>  
  285. </rss>  
 
说明一下:
折叠XML/HTML 代码
  1. <?xml version="1.0" encoding="utf-8"?>     
  2. <rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">     
  3.   <channel>     
  4.     <title>::家猫编程社区::</title>     
  5.     <link>http://www.jiamaocode.com</link>     
  6.     <description>::家猫编程社区::</description>     
  7.     <language>zh-cn</language>     
  8.     <pubDate>Sun, 25 Apr 2010 22:19:24 GMT</pubDate>     
  9.     <lastBuildDate>Sun, 25 Apr 2010 22:19:24 GMT</lastBuildDate>     
  10.     <docs>http://www.jiamaocode.com/JmRss</docs>     
  11.     <generator>::家猫编程社区::</generator>     
  12.     <managingEditor>haofefe@163.com</managingEditor>     
  13.     <webMaster>haofefe@163.com</webMaster>     
  14.     <ttl>28</ttl>     
这是前面的头,有生成时间,
 <ttl>28</ttl>     为当前RSS文章个数
其它的都很简单
 
 <item>  就是每篇文章信息了,,包含链接和简要说明等
 然后用response.write这此信息就可以做成了RSS订阅功能了
 
比如在根目录下建个RSS目录.里面有个default.aspx页面.此页面只做了response.write这些信息,
当访问此目录时就会显示为当前RSS列表
实例地址:http://www.jiamaocode.com/JmRss/

最后给出一个小的实例..很多东西我都把它写死了..大家可以自已改

其中的jm.common.io是我封装的一个DLL..只是用到了它的xml读写功能..大家可以自已看
http://jiamaocode.com/Conts/1067/1067.html

原创粉丝点击