<asp:Repeater ID="rptRssFeed" runat="server" >
Code Behind:
public partial class _controls_RssFeed : System.Web.UI.UserControl
//Queries to pick the top 5 feeds/items order by date DESC - LINQ
So now the Re-Usable Web User Control is developed and ready to use across the application.
Create a Page and Inherit the Web User Control:
Just register the control and use it as as when needed. Here is the page code.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register src="_controls/RssFeed.ascx" tagname="RssFeed" tagprefix="uc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<uc:RssFeed ID="ctrRssFeed" runat="server" FeedUrl="http://rss.news.yahoo.com/rss/sports" />
</div>
</form>
</body>
</html>