atomsite.net

The AtomPub server for .NET

Controls

Posted in Technical by JarrettV on 8/29/2008 8:12:32 PM - CST

Note: since the move to ASP.NET MVC the use of controls is deprecated in favor of partials

The front-end website for BlogSvc has some great ASP.NET controls for displaying entries and feeds. The controls are all based on either an Entry or Feed through the BaseEntryControl and the BaseFeedControl. These controls have a Source property that can be used to declare which Entry or Feed to display based on either their Id or Url. The Feed based controls also have a MaxEntries property which controls how many entries to display.

<%@ Register="" src="Controls/FeedSummary.ascx" tagname="FeedSummary" tagprefix="uc1" %>
<%@ Register="" src="Controls/FeedList.ascx" tagname="FeedList" tagprefix="uc3" %>
<%@ Register="" src="Controls/EntrySimple.ascx" tagname="EntrySimple" tagprefix="uc2" %>
<uc2:EntrySimple ID="EntrySimple1" Source="tag:blogsvc.net,2008:info,About" runat="server" />
<uc1:FeedSummary ID="FeedSummary1" Source="tag:blogsvc.net,2008:blog" MaxEntries="4" runat="server" />
<uc3:FeedList ID="FeedList1" Source="http://rss.cnn.com/rss/cnn_freevideo.rss" MaxEntries="6" runat="server" />
     
© Copyright 2010 Powered by AtomSite 1.4.0.0