I'm working on project RSS generation in MVC.Net. in taht i want to make bookmark. for that i have write the code on controller. first there is one aspx page from which subscription page gets open.
public ActionResult ViewBlog() { if (Session[SessionVariables.username] == null) { return RedirectToAction("Login", "Home"); } else { return View(classObj.fetchAllBlogs()); } }
and coding for subscription is: public ActionResult Rss() {
string bcontent = classObj.showBlog();
DateTime postdate = classObj.showPostDate();
List<SyndicationItem> items = new SyndicationItem[]
{
new SyndicationItem("RSS Blog",bcontent+postdate,null),
}.ToList();
RssResult r = new RssResult();
SyndicationFeed feed = new SyndicationFeed("Admin: Blog Posts", "RSS Feed",Request.Url , items);
return new RssResult(feed);
Developer", "The latest news on ASP.NET, C# and ASP.NET MVC ");
}
but problem is that when usr clicks on bookmark then intested of opening ViewBlog.aspx it opens the same page. i want to open ViewBlog.aspx. I think the problem is in: SyndicationFeed feed = new SyndicationFeed("Admin: Blog Posts", "RSS Feed",Request.Url , items);
Plz help ...!