locked
rss feed RRS feed

  • Question

  • User930865304 posted

    hai i doing a dynamic websites  and i wanted to do rss feed from database of my dynamic site. i requesting you to kindly send the code .....thank you in advance.

     

    regards

    bharath

    Monday, February 2, 2009 5:41 AM

Answers

  • User541108374 posted

    Hi,

    take a look at the RSS Toolkit

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 2, 2009 5:51 AM
  • User-690506545 posted

    I swore I'd never do this...but...

    http://www.google.co.uk/search?q=asp.net+rss+feed+from+database

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 2, 2009 6:11 AM
  • User1006193418 posted

    hai i doing a dynamic websites  and i wanted to do rss feed from database of my dynamic site. i requesting you to kindly send the code .....thank you in advance.

    regards

    bharath

    Hi,

    You can use ASP.NET 2.0 RSS Tool-Kit to implement your own RSS Feed.

    Have a look at these two articles talking about this awesome method. They will get you start:

    http://weblogs.asp.net/scottgu/archive/2006/02/22/Awesome-ASP.NET-2.0-RSS-Tool_2D00_Kit-Released.aspx

    http://blogs.msdn.com/shahpiyush/archive/2007/06/16/3331941.aspx

    Also, searching on Internet will return you thousands of links discussing hwo to use RSS with ASP.Net.

    Best Regard,
    Shengqing Yang

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 4, 2009 6:24 AM
  • User1006193418 posted

    Hi,

    For more:

    ASP.Net RSS Toolkit ... : http://www.codeplex.com/ASPNETRSSToolkit

    Creating an RSS feed for your ASP.NET site: http://www.aspcode.net/Creating-an-RSS-feed-for-your-ASPNET-site.aspx

     Consuming RSS Feed using ASP.NET: http://www.dotnetcurry.com/ShowArticle.aspx?ID=137

    And existed threads:

    RSS Feeds: http://forums.asp.net/t/1347643.aspx

    RSS Feed: http://forums.asp.net/t/1176216.aspx

    And you can also search in the forum via this link:

    http://forums.asp.net/search/SearchResults.aspx?q=rss&o=Relevance&PageIndex=1

    Regards,
    Shengqing Yang

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 4, 2009 6:30 AM
  • User1816965282 posted

    Hi

    Use the RssToolkit.dll file

    here is a sample code

    aspx page as follows

     <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

        <form id="form1" runat="server">
         <asp:scriptmanager id="scriptmanager1" runat="server" />
            <div id="content-container">
                <div id="content-side1">
                    <ul class="list-of-links">
                        <li id="list1" class="current">
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument="1" OnCommand="lnkOptions_Command"
                                OnClientClick="linklist_onclick(1);">Front Page</asp:LinkButton></li><li id="list2">
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="2" OnClientClick="linklist_onclick(2);"
                                OnCommand="lnkOptions_Command">National</asp:LinkButton></li><li id="list3">
                            <asp:LinkButton ID="LinkButton3" runat="server" CommandArgument="3" OnClientClick="linklist_onclick(3);"
                                OnCommand="lnkOptions_Command"> International</asp:LinkButton></li><li id="list4">
                            <asp:LinkButton ID="LinkButton4" runat="server" CommandArgument="4" OnClientClick="linklist_onclick(4);"
                                OnCommand="lnkOptions_Command">Opinion</asp:LinkButton></li><li id="list5">
                            <asp:LinkButton ID="LinkButton5" runat="server" CommandArgument="5" OnClientClick="linklist_onclick(5);"
                                OnCommand="lnkOptions_Command">Business</asp:LinkButton></li><li id="list6">
                            <asp:LinkButton ID="LinkButton6" runat="server" CommandArgument="6" OnClientClick="linklist_onclick(6);"
                                OnCommand="lnkOptions_Command">Sport</asp:LinkButton></li><li id="list7">
                            <asp:LinkButton ID="LinkButton7" runat="server" CommandArgument="7" OnClientClick="linklist_onclick(7);"
                                OnCommand="lnkOptions_Command">Miscellaneous</asp:LinkButton></li><li id="list8">
                            <asp:LinkButton ID="LinkButton8" runat="server" CommandArgument="8" OnClientClick="linklist_onclick(8);"
                                OnCommand="lnkOptions_Command">Engagements</asp:LinkButton></li><li id="list9">
                            <asp:LinkButton ID="LinkButton9" runat="server" CommandArgument="9" OnClientClick="linklist_onclick(9);"
                                OnCommand="lnkOptions_Command">Young World</asp:LinkButton></li><li id="list10">
                           
                 </ul>
                </div>
               
                <div id="content-main">
                    <asp:UpdatePanel ID="updateMain" runat="server" UpdateMode="conditional">
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="LinkButton1" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton2" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton3" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton4" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton5" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton6" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton7" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton8" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton9" />
                        </Triggers>
                        <ContentTemplate>
                            <h2>
                                <asp:Label ID="lblHeader" runat="server">The Hindu</asp:Label></h2>
                            <hr />
                            <asp:Panel ID="BlogPanel1" runat="server">
                                <rss:rssdatasource id="RssDataSource1" runat="server" maxitems="0" Url="http://www.hindu.com/rss/02hdline.xml">
                                </rss:rssdatasource>
                               
                                <asp:DataList ID="BlogList1" runat="server" DataSourceID="RssDataSource1" CellPadding="4" ForeColor="#333333">
                                    <ItemTemplate>
                                        <asp:Panel ID="panelHeader" runat="server" Style="cursor: pointer; color: #d61719;
                                            width: 100%; display: block;">
                                            <span style="float: left;">
                                                <%# Eval("title") %>
                                            </span>
                                            <asp:Image ID="Image1" runat="server" Style="float: right;" ImageUrl="~/images/expand_blue.jpg" />
                                        </asp:Panel>
                                        <asp:Panel ID="Panel1" runat="server" Style="margin-top: 3px; background: transparent url(images/blogBack.gif) no-repeat text-top left;">
                                            <span style="float:left;">
                                            <%# Eval("description") %>
                                            </span>
                                              (<asp:HyperLink ID="hlMore" runat="server" NavigateUrl='<%# Eval("link") %>' Target="_blank"
                                                Text="read more"></asp:HyperLink>)
                                              </asp:Panel>
                                              <ajaxToolkit:CollapsiblePanelExtender ID="cpe1" runat="server" TargetControlID="Panel1" expandcontrolid="panelHeader" collapsecontrolid="panelHeader" suppresspostback="true" imagecontrolid="Image1" collapsed="true" expandedimage="~/images/collapse_blue.jpg" collapsedimage="~/images/expand_blue.jpg">
                                              </ajaxToolkit:CollapsiblePanelExtender>
                                        <hr style="border-bottom: 1px dotted #B2B2B2; margin: 0px;" />
                                    </ItemTemplate>
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <AlternatingItemStyle BackColor="White" />
                                    <ItemStyle BackColor="#EFF3FB" />
                                    <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                </asp:DataList>
                            </asp:Panel>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </div>
            <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="0" DynamicLayout="true">
                <ProgressTemplate>
                    <div id="updProgress">
                        <img alt="" src="images/indicator.gif" />
                        <span>Working on your request...</span>
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
        </form>

     

    aspx.cs page as follows

        protected void lnkOptions_Command(object sender, CommandEventArgs e)
        {
            int command = Convert.ToInt32(e.CommandArgument);

            switch (command)
            {
                case 1:
                    RssDataSource1.Url = "http://www.hindu.com/rss/01hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Front Page News";
                    break;
                case 2:
                    RssDataSource1.Url = "http://www.hindu.com/rss/02hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "National News";
                    break;
                case 3:
                    RssDataSource1.Url = "http://www.hindu.com/rss/03hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "International News";
                    break;
                case 4:
                    RssDataSource1.Url = "http://www.hindu.com/rss/05hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Opinion";
                    break;
                case 5:
                    RssDataSource1.Url = "http://www.hindu.com/rss/06hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Business";
                    break;
                case 6:
                    RssDataSource1.Url = " http://www.hindu.com/rss/07hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Sport";
                    break;
                case 7:
                    RssDataSource1.Url = " http://www.hindu.com/rss/10hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Miscellaneous";
                    break;
                case 8:
                    RssDataSource1.Url = "http://www.hindu.com/rss/26hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Engagements";
                    break;
                case 9:
                    RssDataSource1.Url = "http://www.hindu.com/rss/ywchenhdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Young World";
                    break;
                default:
                    break;
            }
        }

    This will work dude

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 4, 2009 7:26 AM

All replies

  • User541108374 posted

    Hi,

    take a look at the RSS Toolkit

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 2, 2009 5:51 AM
  • User930865304 posted

     i need some examples of doing rss feed from database...............

    Monday, February 2, 2009 6:03 AM
  • User-690506545 posted

    I swore I'd never do this...but...

    http://www.google.co.uk/search?q=asp.net+rss+feed+from+database

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 2, 2009 6:11 AM
  • User1006193418 posted

    hai i doing a dynamic websites  and i wanted to do rss feed from database of my dynamic site. i requesting you to kindly send the code .....thank you in advance.

    regards

    bharath

    Hi,

    You can use ASP.NET 2.0 RSS Tool-Kit to implement your own RSS Feed.

    Have a look at these two articles talking about this awesome method. They will get you start:

    http://weblogs.asp.net/scottgu/archive/2006/02/22/Awesome-ASP.NET-2.0-RSS-Tool_2D00_Kit-Released.aspx

    http://blogs.msdn.com/shahpiyush/archive/2007/06/16/3331941.aspx

    Also, searching on Internet will return you thousands of links discussing hwo to use RSS with ASP.Net.

    Best Regard,
    Shengqing Yang

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 4, 2009 6:24 AM
  • User1006193418 posted

    Hi,

    For more:

    ASP.Net RSS Toolkit ... : http://www.codeplex.com/ASPNETRSSToolkit

    Creating an RSS feed for your ASP.NET site: http://www.aspcode.net/Creating-an-RSS-feed-for-your-ASPNET-site.aspx

     Consuming RSS Feed using ASP.NET: http://www.dotnetcurry.com/ShowArticle.aspx?ID=137

    And existed threads:

    RSS Feeds: http://forums.asp.net/t/1347643.aspx

    RSS Feed: http://forums.asp.net/t/1176216.aspx

    And you can also search in the forum via this link:

    http://forums.asp.net/search/SearchResults.aspx?q=rss&o=Relevance&PageIndex=1

    Regards,
    Shengqing Yang

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 4, 2009 6:30 AM
  • User1816965282 posted

    Hi

    Use the RssToolkit.dll file

    here is a sample code

    aspx page as follows

     <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

        <form id="form1" runat="server">
         <asp:scriptmanager id="scriptmanager1" runat="server" />
            <div id="content-container">
                <div id="content-side1">
                    <ul class="list-of-links">
                        <li id="list1" class="current">
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument="1" OnCommand="lnkOptions_Command"
                                OnClientClick="linklist_onclick(1);">Front Page</asp:LinkButton></li><li id="list2">
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="2" OnClientClick="linklist_onclick(2);"
                                OnCommand="lnkOptions_Command">National</asp:LinkButton></li><li id="list3">
                            <asp:LinkButton ID="LinkButton3" runat="server" CommandArgument="3" OnClientClick="linklist_onclick(3);"
                                OnCommand="lnkOptions_Command"> International</asp:LinkButton></li><li id="list4">
                            <asp:LinkButton ID="LinkButton4" runat="server" CommandArgument="4" OnClientClick="linklist_onclick(4);"
                                OnCommand="lnkOptions_Command">Opinion</asp:LinkButton></li><li id="list5">
                            <asp:LinkButton ID="LinkButton5" runat="server" CommandArgument="5" OnClientClick="linklist_onclick(5);"
                                OnCommand="lnkOptions_Command">Business</asp:LinkButton></li><li id="list6">
                            <asp:LinkButton ID="LinkButton6" runat="server" CommandArgument="6" OnClientClick="linklist_onclick(6);"
                                OnCommand="lnkOptions_Command">Sport</asp:LinkButton></li><li id="list7">
                            <asp:LinkButton ID="LinkButton7" runat="server" CommandArgument="7" OnClientClick="linklist_onclick(7);"
                                OnCommand="lnkOptions_Command">Miscellaneous</asp:LinkButton></li><li id="list8">
                            <asp:LinkButton ID="LinkButton8" runat="server" CommandArgument="8" OnClientClick="linklist_onclick(8);"
                                OnCommand="lnkOptions_Command">Engagements</asp:LinkButton></li><li id="list9">
                            <asp:LinkButton ID="LinkButton9" runat="server" CommandArgument="9" OnClientClick="linklist_onclick(9);"
                                OnCommand="lnkOptions_Command">Young World</asp:LinkButton></li><li id="list10">
                           
                 </ul>
                </div>
               
                <div id="content-main">
                    <asp:UpdatePanel ID="updateMain" runat="server" UpdateMode="conditional">
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="LinkButton1" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton2" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton3" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton4" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton5" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton6" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton7" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton8" />
                            <asp:AsyncPostBackTrigger ControlID="LinkButton9" />
                        </Triggers>
                        <ContentTemplate>
                            <h2>
                                <asp:Label ID="lblHeader" runat="server">The Hindu</asp:Label></h2>
                            <hr />
                            <asp:Panel ID="BlogPanel1" runat="server">
                                <rss:rssdatasource id="RssDataSource1" runat="server" maxitems="0" Url="http://www.hindu.com/rss/02hdline.xml">
                                </rss:rssdatasource>
                               
                                <asp:DataList ID="BlogList1" runat="server" DataSourceID="RssDataSource1" CellPadding="4" ForeColor="#333333">
                                    <ItemTemplate>
                                        <asp:Panel ID="panelHeader" runat="server" Style="cursor: pointer; color: #d61719;
                                            width: 100%; display: block;">
                                            <span style="float: left;">
                                                <%# Eval("title") %>
                                            </span>
                                            <asp:Image ID="Image1" runat="server" Style="float: right;" ImageUrl="~/images/expand_blue.jpg" />
                                        </asp:Panel>
                                        <asp:Panel ID="Panel1" runat="server" Style="margin-top: 3px; background: transparent url(images/blogBack.gif) no-repeat text-top left;">
                                            <span style="float:left;">
                                            <%# Eval("description") %>
                                            </span>
                                              (<asp:HyperLink ID="hlMore" runat="server" NavigateUrl='<%# Eval("link") %>' Target="_blank"
                                                Text="read more"></asp:HyperLink>)
                                              </asp:Panel>
                                              <ajaxToolkit:CollapsiblePanelExtender ID="cpe1" runat="server" TargetControlID="Panel1" expandcontrolid="panelHeader" collapsecontrolid="panelHeader" suppresspostback="true" imagecontrolid="Image1" collapsed="true" expandedimage="~/images/collapse_blue.jpg" collapsedimage="~/images/expand_blue.jpg">
                                              </ajaxToolkit:CollapsiblePanelExtender>
                                        <hr style="border-bottom: 1px dotted #B2B2B2; margin: 0px;" />
                                    </ItemTemplate>
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <AlternatingItemStyle BackColor="White" />
                                    <ItemStyle BackColor="#EFF3FB" />
                                    <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                </asp:DataList>
                            </asp:Panel>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </div>
            <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="0" DynamicLayout="true">
                <ProgressTemplate>
                    <div id="updProgress">
                        <img alt="" src="images/indicator.gif" />
                        <span>Working on your request...</span>
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
        </form>

     

    aspx.cs page as follows

        protected void lnkOptions_Command(object sender, CommandEventArgs e)
        {
            int command = Convert.ToInt32(e.CommandArgument);

            switch (command)
            {
                case 1:
                    RssDataSource1.Url = "http://www.hindu.com/rss/01hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Front Page News";
                    break;
                case 2:
                    RssDataSource1.Url = "http://www.hindu.com/rss/02hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "National News";
                    break;
                case 3:
                    RssDataSource1.Url = "http://www.hindu.com/rss/03hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "International News";
                    break;
                case 4:
                    RssDataSource1.Url = "http://www.hindu.com/rss/05hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Opinion";
                    break;
                case 5:
                    RssDataSource1.Url = "http://www.hindu.com/rss/06hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Business";
                    break;
                case 6:
                    RssDataSource1.Url = " http://www.hindu.com/rss/07hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Sport";
                    break;
                case 7:
                    RssDataSource1.Url = " http://www.hindu.com/rss/10hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Miscellaneous";
                    break;
                case 8:
                    RssDataSource1.Url = "http://www.hindu.com/rss/26hdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Engagements";
                    break;
                case 9:
                    RssDataSource1.Url = "http://www.hindu.com/rss/ywchenhdline.xml";
                    BlogList1.DataBind();
                    lblHeader.Text = "Young World";
                    break;
                default:
                    break;
            }
        }

    This will work dude

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 4, 2009 7:26 AM