--- RSS. aspx
<% @ Page Language = "C #" codebehind = "RSS. aspx. cs" autoeventwireup = "false" inherits = "socent. RSS" %>
--- RSS. aspx. CS
Using system;
Using system. collections;
Using system. componentmodel;
Using system. Data;
Using system. drawing;
Using system. Web;
Using system. Web. sessionstate;
Using system. Web. UI;
Using system. Web. UI. webcontrols;
Using system. Web. UI. htmlcontrols;
Namespace socent
{
/// <Summary>
/// {0}
/// </Summary>
Public class RSS: system. Web. UI. Page
{
Components. genrss GR = new components. genrss (); // ê µà pretty» too many
String strrss = "";
Private void page_load (Object sender, system. eventargs E)
{
Response. contenttype = "application/XML"; // ä äö ö² comment ° 'xml has been found too many have been found
Response. Write (getrss ());
}
/// <Summary>
/// {0}
/// </Summary>
Public String getrss ()
{
Dataset DS = gr. generaterss (); // µó ó ã generaterss () • ½ •?,» 'n' limit
Strrss = strrss + "<RSS version =" 2.0 "> ";
Strrss = strrss + "<channel> ";
Strrss = strrss + "<title> íáè ö öæ ì </title> ";
Strrss = strrss + "<link> http://www.socent.com </link> ";
Strrss = strrss + "<description> íáè ~ö~~~</description> ";
For (INT I = 0; I <Ds. Tables [0]. Rows. Count; I ++)
{
Strrss = strrss + "<item> ";
Strrss = strrss + "<title> <! [CDATA ["+ Ds. Tables [0]. Rows [I] [" title "] +"]> </title> ";
Strrss = strrss + "<link> http://www.socent.com/ArticleShow@" + Ds. Tables [0]. Rows [I] ["ID"] + ". html </link> ";
Strrss = strrss + "<description> <! [CDATA ["+ Ds. Tables [0]. Rows [I] [" Description "] +"]> </description> ";
Strrss = strrss + "<copyright> íáè ~ö~~~</Copyright> ";
Strrss = strrss + "<pubdate>" + convert. todatetime (Ds. tables [0]. rows [I] ["adddate"]. tostring ()). tostring ("yyyy-mm-dd hh: mm") + "</pubdate> ";
Strrss = strrss + "<comments> http://www.socent.com/CommentShow@" + Ds. Tables [0]. Rows [I] ["ID"] + ". html </comments> ";
Strrss = strrss + "</item> ";
}
Strrss = strrss + "</channel> ";
Strrss = strrss + "</RSS> ";
Return strrss;
}
# Region Web '° ****************************
Override protected void oninit (eventargs E)
{
//
// Codegen: zookeeper μ ÷ ó ç çasp. NET web '° ****************************
//
Initializecomponent ();
Base. oninit (E );
}
/// <Summary>
/// É ~~~~ö§ ö ö ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~」 ~~~~ä
/// '{• {• {Μäúè {£
/// </Summary>
Private void initializecomponent ()
{
This. Load + = new system. eventhandler (this. page_load );
}
# Endregion
}
}