November Happy Hour will be moved to Thursday December 5th.

noname

Vote:
 
Hi, I am Santosh, working as a software engineer. Am trying to implement RSS feed and to make it active for the home page of my site. we are using EPiServer for our website. Currently, am having the code as below in a file named, rssfeed.aspx. Plese suugest me how can go with this. <%@ page language="c#" codebehind="rssfeed.aspx.cs" autoeventwireup="false" inherits="NS.NassCom.rssfeed" %> <%@import namespace="System.Text" %> <%@import namespace="EPiServer" %> <%@import namespace="EPiServer.Core" %> <%@import namespace="System" %> RSS Feed
<% pagedata category; category="Global.EPDataFactory.GetPage(new" pagereference(int.parse(request.querystring["id"]).tostring())); stringbuilder rssxml="new" stringbuilder(); rssxml.append(">"); rssxml.Append(""); rssxml.Append(""); rssxml.Append(""+ category.PageName.ToString().Replace("&","&") ""); rssxml.Append("http://www.nasscom.in"+ category.LinkURL.ToString().Replace("&","&") +""); if(category.Property.Exists("description")) { rssxml.Append("" + category.Property["description"].ToString().Replace(" "," ").Replace("&","&") +""); } rssxml.Append(""+ Convert.ToDateTime(category.StartPublish).ToString("ddd, dd MMM yyyy hh:mm:ss z") +""); rssxml.Append(""+ Convert.ToDateTime(category.Changed).ToString("ddd, dd MMM yyyy hh:mm:ss z")+""); PageDataCollection pdc = Global.EPDataFactory.GetChildren(new PageReference(int.Parse(Request.QueryString["ID"]).ToString())); PageData pd; for(int i = 0; i < pdc.Count; i++) { pd = pdc[i]; rssxml.Append(""); rssxml.Append("" + pd.PageName.ToString().Replace("&","&") + ""); if (category.Property.Exists("author") && pd.Property["author"].ToString() != "") { rssxml.Append("" + pd.Property["author"].ToString().Replace("&","&") + ""); } rssxml.Append(""+ category.PageName.ToString().Replace("&","&") + ""); if (category.Property.Exists("spotlightimage") && pd.Property["spotlightimage"].ToString() != "") { rssxml.Append(""); } rssxml.Append("http://www.nasscom.in" + pd.LinkURL.ToString().Replace("&","&") + ""); if(category.Property.Exists("description") && pd.Property["description"].ToString() != "") { rssxml.Append("" + pd.Property["description"].ToString().Replace(" "," ").Replace("&","&") + ""); } rssxml.Append("" + Convert.ToDateTime(pd.StartPublish).ToString("ddd, dd MMM yyyy hh:mm:ss z") + ""); rssxml.Append("" + Convert.ToDateTime(pd.Changed).ToString("ddd, dd MMM yyyy hh:mm:ss z") + ""); rssxml.Append("\n"); } rssxml.Append(""); rssxml.Append(""); Response.Write(rssxml.ToString()); %>
I would really appreciate if someone could help me out with this.
#13245
Oct 26, 2007 11:14
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.