<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.habaneros.com/~d/styles/itemcontent.css"?><rss version="2.0">
  <channel>
    <title>Sitfinity Insights by Habanero</title>
    <description>RSS Feed of Habanero's Sitefinity Insights Blog</description>
    <link>http://sitefinity.habaneros.com/Default.aspx</link>
    <docs>http://backend.userland.com/rss</docs>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.habaneros.com/Sitefinity" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="sitefinity" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <title>Using the Sitefinity RadEditor in a custom control template</title>
      <description>We had a need to use the RadEditor in the form that it appears throughout Sitefinity, including the library item selector etc. when editing a meta field we had added to the Images and Documents module.  We needed the meta field to be saved as HTML.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I thought this would be quite straightfoward, I opened up a template from the downloadable external templates file for Sitefinity 3.7 and took a look at how they were implementing the editor on that page.  I copied and pasted it onto my template, refreshed my image edit screen and... got an error.  After looking at it for some time I could not see what the issue was, so I posted a support ticket to Sitefinity, and as usual, the next morning I had a response in my nbox!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is what you need to put on your template in order to get the RadEditor to function.  The main difference from what was on the templates I was looking at and this is the used of the RadCodeBlock control. &lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); background-color: rgb(255, 255, 255); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;telerik:RadEditor &lt;/span&gt;&lt;span style="color: red; "&gt;runat&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"server"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;id&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"Description"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    &lt;span style="color: red; "&gt;ContentAreaCssFile&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorContentArea.css"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: red; "&gt;ToolsFile&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    &lt;span style="color: red; "&gt;Skin&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"WebBlue"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: red; "&gt;NewLineBr&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"False"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    &lt;span style="color: red; "&gt;Width&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"95%"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: red; "&gt;ContentFilters&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"FixUlBoldItalic,FixEnclosingP,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    &lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;ImageManager &lt;/span&gt;&lt;span style="color: red; "&gt;ViewPaths&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Images"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;UploadPaths&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Images"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;DeletePaths&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Images"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;/&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;MediaManager &lt;/span&gt;&lt;span style="color: red; "&gt;ViewPaths&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Files"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;UploadPaths&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Files"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;DeletePaths&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Files"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;/&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    &lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;FlashManager &lt;/span&gt;&lt;span style="color: red; "&gt;ViewPaths&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Files"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;UploadPaths&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Files"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;DeletePaths&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Files"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;/&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;DocumentManager &lt;/span&gt;&lt;span style="color: red; "&gt;ViewPaths&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Files"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;UploadPaths&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Files"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;DeletePaths&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Files"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;/&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    &lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;CssFiles&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;telerik:EditorCssFile &lt;/span&gt;&lt;span style="color: red; "&gt;Value&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorCssFile.css"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;/&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    &lt;span style="color: blue; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;CssFiles&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: blue; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;telerik:RadEditor&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;telerik:RadCodeBlock &lt;/span&gt;&lt;span style="color: red; "&gt;ID&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"RadCodeBlock1"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;runat&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"server"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;script &lt;/span&gt;&lt;span style="color: red; "&gt;type&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"text/javascript"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&amp;lt;!-- &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            Telerik.Web.UI.Editor.CommandList["LibraryImageManager"] = function(commandName, editor, args) { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var &lt;span style="color: blue; "&gt;editor&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: red; "&gt;editorArgs&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = editor.getSelectedElement(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A") &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    &lt;span style="color: blue; "&gt;editor&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: red; "&gt;editorArgs&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = editor.getSelection(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var &lt;span style="color: red; "&gt;myCallbackFunction&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;function&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;(sender, args) { &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    if (typeof (editorArgs.nodeName) != "undefined" &amp;amp;&amp;amp; &lt;span style="color: red; "&gt;editorArgs.nodeName&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; == "IMG") &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                        args.parentNode.replaceChild(editorArgs, args); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    else { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                        var &lt;span style="color: red; "&gt;cloned&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;args&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.cloneNode(true); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                        var &lt;span style="color: red; "&gt;div&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;args&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ownerDocument.createElement("DIV"); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                        div.appendChild(cloned); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                        editorArgs.pasteHtml(div.innerHTML); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var &lt;span style="color: red; "&gt;path&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;'&amp;lt;%= ((Telerik.Cms.Web.CmsPageBase)Page).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/ImageEditorDialog.aspx") %&amp;gt;'&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                editor.showExternalDialog( &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   path, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   editorArgs, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   750, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   515, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   myCallbackFunction, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   null, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   'ImageLibraryDialog', &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   true, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   false, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   true) &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            Telerik.Web.UI.Editor.CommandList["LibraryDocumentManager"] = function(commandName, editor, args) { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var &lt;span style="color: blue; "&gt;editor&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: red; "&gt;editorArgs&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = editor.getSelectedElement(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A") &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    &lt;span style="color: blue; "&gt;editor&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: red; "&gt;editorArgs&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = editor.getSelection(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var &lt;span style="color: red; "&gt;myCallbackFunction&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;function&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;(sender, args) { &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    if (typeof (editorArgs.nodeName) != "undefined" &amp;amp;&amp;amp; &lt;span style="color: red; "&gt;editorArgs.nodeName&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; == "A") &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                        args.parentNode.replaceChild(editorArgs, args); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    else { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                        var &lt;span style="color: red; "&gt;cloned&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;args&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.cloneNode(true); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                        var &lt;span style="color: red; "&gt;div&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;args&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ownerDocument.createElement("DIV"); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                        div.appendChild(cloned); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                        editorArgs.pasteHtml(div.innerHTML); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var &lt;span style="color: red; "&gt;path&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;'&amp;lt;%= ((Telerik.Cms.Web.CmsPageBase)Page).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/DocumentEditorDialog.aspx") %&amp;gt;'&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                editor.showExternalDialog( &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   path, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   editorArgs, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   750, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   515, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   myCallbackFunction, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   null, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   'ImageLibraryDialog', &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   false, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   false, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   true) &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            Telerik.Web.UI.Editor.CommandList["LinkManager"] = function(commandName, editor, args) { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var &lt;span style="color: blue; "&gt;editor&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: red; "&gt;editorArgs&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = editor.getSelectedElement(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A") { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    var &lt;span style="color: red; "&gt;sel&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;editor&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.getSelection(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    &lt;span style="color: red; "&gt;editorArgs&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;sel&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    &lt;span style="color: red; "&gt;editorArgs.Html&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;sel&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.getHtml(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    &lt;span style="color: red; "&gt;editorArgs.Text&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;sel&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.getText(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var &lt;span style="color: red; "&gt;myCallbackFunction&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;function&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;(sender, args) { &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    if (typeof (editorArgs.nodeName) != "undefined" &amp;amp;&amp;amp; &lt;span style="color: red; "&gt;editorArgs.nodeName&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; == "A") &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                        args.parentNode.replaceChild(editorArgs, args); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    else { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                        var &lt;span style="color: red; "&gt;cloned&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;args&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.cloneNode(true); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                        var &lt;span style="color: red; "&gt;div&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;args&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ownerDocument.createElement("DIV"); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                        div.appendChild(cloned); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                        editorArgs.pasteHtml(div.innerHTML); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                var &lt;span style="color: red; "&gt;path&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;'&amp;lt;%= ((Telerik.Cms.Web.CmsPageBase)Page).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/LinksDialog.aspx") %&amp;gt;'&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                editor.showExternalDialog( &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   path, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   editorArgs, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   750, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   515, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   myCallbackFunction, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   null, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   'ImageLibraryDialog', &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   false, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   false, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   true) &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            }; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            Telerik.Web.UI.Editor.CommandList["SetLinkProperties"] = function(commandName, editor, args) { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                var &lt;span style="color: blue; "&gt;editor&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: red; "&gt;editorArgs&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = editor.getSelectedElement(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A") &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    &lt;span style="color: blue; "&gt;editor&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: red; "&gt;editorArgs&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = editor.getSelection(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                var &lt;span style="color: red; "&gt;myCallbackFunction&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;function&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;(sender, args) { &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    if (typeof (editorArgs.nodeName) != "undefined" &amp;amp;&amp;amp; &lt;span style="color: red; "&gt;editorArgs.nodeName&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; == "A") &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                        args.parentNode.replaceChild(editorArgs, args); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    else { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                        var &lt;span style="color: red; "&gt;cloned&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;args&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.cloneNode(true); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                        var &lt;span style="color: red; "&gt;div&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;args&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ownerDocument.createElement("DIV"); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                        div.appendChild(cloned); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                        editorArgs.pasteHtml(div.innerHTML); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var &lt;span style="color: red; "&gt;path&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;'&amp;lt;%= ((Telerik.Cms.Web.CmsPageBase)Page).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/LinksDialog.aspx") %&amp;gt;'&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                editor.showExternalDialog( &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   path, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   editorArgs, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   750, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   515, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   myCallbackFunction, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   null, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   'ImageLibraryDialog', &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   false, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;   false, &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;   true) &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            RadEditorCommandList["IncreaseSize"] = function(commandName, editor, oTool) { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var &lt;span style="color: red; "&gt;currentWidth&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;editor&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.get_element().style.width; //get the width of Telerik RadEditor  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                var &lt;span style="color: red; "&gt;currentHeight&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;editor&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.get_element().style.height; //get the heigh of Telerik RadEditor  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                editor.SetSize(currentWidth, currentHeight + 30); //set the height size of the editor to increase with 30px  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            }; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            RadEditorCommandList["DecreaseSize"] = function(commandName, editor, oTool) { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                var &lt;span style="color: red; "&gt;currentWidth&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;editor&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.get_element().style.width; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var &lt;span style="color: red; "&gt;currentHeight&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;editor&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.get_element().style.height; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                editor.SetSize(currentWidth, currentHeight - 30); //set the height size of the editor to decrease with 30px  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            var &lt;span style="color: red; "&gt;oldFunction&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;Telerik&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Web.UI.Editor.CommandList["ToggleScreenMode"]; //save the original Paste function  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            Telerik.Web.UI.Editor.CommandList["ToggleScreenMode"] = function(commandName, editor, args) { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                oldFunction(commandName, editor, args); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var &lt;span style="color: red; "&gt;bd&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;document&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.getElementsByTagName("body")[0]; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                if (/fullScreenMode/.test(bd.className)) { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    var &lt;span style="color: red; "&gt;rep&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = &lt;/span&gt;&lt;span style="color: blue; "&gt;bd&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.className.match(' ' + 'fullScreenMode') ? ' ' + 'fullScreenMode' : 'fullScreenMode'; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    &lt;span style="color: blue; "&gt;bd&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: red; "&gt;bd.className&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; = bd.className.replace(rep, ''); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                } else { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    bd.className += bd.className ? ' ' + 'fullScreenMode' : 'fullScreenMode'; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;--&lt;span style="color: blue; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: blue; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;script&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: blue; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;telerik:RadCodeBlock&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Here are the results.&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;img src="/Libraries/Screen_Shots/RadEditor.sflb.ashx" /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;</description>
      <link>http://sitefinity.habaneros.com/Default/09-10-02/Using_the_Sitefinity_RadEditor_in_a_custom_control_template.aspx</link>
      <author>admin</author>
      <comments>http://sitefinity.habaneros.com/Default/09-10-02/Using_the_Sitefinity_RadEditor_in_a_custom_control_template.aspx</comments>
      <guid isPermaLink="false">e3d83c9f-938e-4383-9205-df03bc2fa970</guid>
      <pubDate>Fri, 02 Oct 2009 10:05:38 GMT</pubDate>
    </item>
    <item>
      <title>RSS Feed Address Updated</title>
      <description>We've moved our feed to Feedburner!  Please update your subscriptions.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://feeds.habaneros.com/Sitefinity"&gt;http://feeds.habaneros.com/Sitefinity&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description>
      <link>http://sitefinity.habaneros.com/Default/09-07-16/RSS_Feed_Address_Updated.aspx</link>
      <author>Adam Crandall</author>
      <comments>http://sitefinity.habaneros.com/Default/09-07-16/RSS_Feed_Address_Updated.aspx</comments>
      <guid isPermaLink="false">583e9f24-466c-494f-89a7-adf41979e018</guid>
      <pubDate>Thu, 16 Jul 2009 11:23:01 GMT</pubDate>
    </item>
    <item>
      <title>Custom Events Workflow bug caused events to be locked</title>
      <description>On a recent project we recently launched we ran across a bug that was causing all events to be locked by the administrator after it was approved.  This had the unfortunate side affect of blocking the creating user from editing the event details after it was approved.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since I could not replicate this on an out of the box sitefinity installation, I started looking at our custom workflow that we used for notifying users when an event was sent for approval.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Our problem was that when trying to get the current content, we were calling the following method:&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'times new roman'; color: rgb(0, 0, 0); font-size: 16px; white-space: normal; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div&gt;&lt;span style="white-space: pre-wrap; font-family: tahoma; font-size: 11px; color: rgb(0, 0, 128); "&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); background-color: rgb(255, 255, 255); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;manager.Content.GetStagedContent(contentId); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The problem with the above code is that it actually sets the content item to be locked by the current user.  This method should really be used when you are about to alter the content, not to just get it to take a peak at what is there.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We changed the line of code to use the GetCurrentState method shown below and this has taken care of this bug for us.&lt;/div&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div&gt;&lt;span style="white-space: pre-wrap; font-family: tahoma; font-size: 11px; color: rgb(0, 0, 128); "&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); background-color: rgb(255, 255, 255); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;manager.Content.GetCurrentState(contentId); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;The reason we had this code in our events notification process was because we created the notification process for the Libraries module first, and Library content does not seem to have the GetCurrentState method.  Copy and paste foiled us once again.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can fine a good knowledge base article on Sitefinity's support site about notifying users that content has been sent for approval &lt;span&gt;&lt;a href="http://www.sitefinity.com/support/kb/sitefinity-3-x/how-to-notify-roles-that-content-has-been-sent-for-approval.aspx"&gt;here&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;</description>
      <link>http://sitefinity.habaneros.com/Default/09-07-16/Custom_Events_Workflow_bug_caused_events_to_be_locked.aspx</link>
      <author>acrandall</author>
      <comments>http://sitefinity.habaneros.com/Default/09-07-16/Custom_Events_Workflow_bug_caused_events_to_be_locked.aspx</comments>
      <guid isPermaLink="false">f692ee53-e1b1-4bb3-ba38-75202967e7f5</guid>
      <pubDate>Thu, 16 Jul 2009 10:53:01 GMT</pubDate>
    </item>
    <item>
      <title>Using Sitefinity Internal Resources in your custom views</title>
      <description>In the current project I am working on, we had the need to create custom views for the events and libraries modules admin pages.  I needed to override the CreateViews() method.  I wanted to use some of the same views that Sitefinity uses so I fired up Reflector and found this code in the events control panel class.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;EventsControlPanel&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); background-color: rgb(255, 255, 255); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: blue; "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;override&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; CreateViews() &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: blue; "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddView&amp;lt;EEventsItemsView(&lt;/span&gt;&lt;span style="color: blue; "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"CommandPanel_EventsItems_Title"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"CommandPanel_EventsItems_Desc"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"all"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, Messages.ResourceManager); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    &lt;span style="color: blue; "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddView&amp;lt;CCategoriesView(&lt;/span&gt;&lt;span style="color: blue; "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"Categories"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"CommandPanel_Categories_Desc"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"cat"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, Messages.ResourceManager); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: blue; "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddView&amp;lt;TTagsView(&lt;/span&gt;&lt;span style="color: blue; "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"Tags"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"CommandPanel_Tags_Desc"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"tags"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, Messages.ResourceManager); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    &lt;span style="color: blue; "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddView&amp;lt;PPermissionsView(&lt;/span&gt;&lt;span style="color: blue; "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"Permissions"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"CommandPanel_Permissions_Desc"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"globalPerm"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, Messages.ResourceManager); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: blue; "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Manager.Provider.AllowComments) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: blue; "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddView&amp;lt;CommentsView&amp;lt;EvEventsControlPanel(&lt;/span&gt;&lt;span style="color: blue; "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"Comments"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"CommandPanel_Comments_Desc"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"comments"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, Messages.ResourceManager); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: blue; "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddView&amp;lt;GeomappingSettingsView&amp;lt;EvEventsControlPanel(&lt;/span&gt;&lt;span style="color: blue; "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"GeomappingSettings"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"CommandPanel_GeomappingSettings_Desc"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"settings"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, Messages.ResourceManager); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The problem with this code is the Messages.ResourceManager that is being passed into the AddView method.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The resource manager provides the view access to the embedded resources that Sitefinity uses.  The problem is that due to some requirements of the .Net Frameworks, the Messages class is marked as Internal, and so is only available to other classes in the same assembly as it is in.  In this case in the Telerik.Events assembly.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Well, I did not want to have to re-create these resource values, and manage them separately, so I did some digging.  In the end, this ResourceManager uses some reflection and and a .NET class called System.Resources.ResourceManager to actually get the resource values.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Teleriks code in the Telerik.Events.Resources namespace uses the following code to return the resource manager:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); background-color: rgb(255, 255, 255); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: blue; "&gt;internal&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;static&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; ResourceManager ResourceManager &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: blue; "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: blue; "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: blue; "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ReferenceEquals(resourceMan, &lt;/span&gt;&lt;span style="color: blue; "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            ResourceManager manager = &lt;span style="color: blue; "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; ResourceManager(&lt;/span&gt;&lt;span style="color: blue; "&gt;"Telerik.Events.Resources.Messages"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;typeof&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;(Messages).Assembly); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            resourceMan = manager; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: blue; "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; resourceMan; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Again, we don't have access to the Messages class that is being referenced here, but luckily this class lives in the same assembly as some other classes we do have access to.  So we can create a simmilar method that will return a ResourceManager that we can use in our custom views.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is the code that you could put in a helper class, or right in your view.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); background-color: rgb(255, 255, 255); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: green; "&gt;//since the telerik resource classes are all makred internal, we have to use reflection to do what we need to do.&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: blue; "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;static&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; ResourceManager resourceMan; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: blue; "&gt;static&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; ResourceManager ResourceManager &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: blue; "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;span style="color: blue; "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: blue; "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ReferenceEquals(resourceMan, &lt;/span&gt;&lt;span style="color: blue; "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    ResourceManager manager = &lt;span style="color: blue; "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; ResourceManager(&lt;/span&gt;&lt;span style="color: blue; "&gt;"Telerik.Events.Resources.Messages"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;typeof&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;(Telerik.Events.EventsManager).Assembly); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    resourceMan = manager; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                &lt;span style="color: blue; "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; resourceMan; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        } &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Instead of calling typeof(Messages).Assembly, we can call typeof(Telerik.Events.EventsManager).Assembly.  This works well because the EventsManager class will probably always be available, and since this class is in the same assembly as the Messages class, .Assembly returns the same thing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now we can rely on Sitefinity's Resources and save ourselves a big headache!&lt;/div&gt;</description>
      <link>http://sitefinity.habaneros.com/Default/09-06-01/Using_Sitefinity_Internal_Resources_in_your_custom_views.aspx</link>
      <author>admin</author>
      <comments>http://sitefinity.habaneros.com/Default/09-06-01/Using_Sitefinity_Internal_Resources_in_your_custom_views.aspx</comments>
      <guid isPermaLink="false">8a4b24c7-d80d-4cb8-8a5e-2bfb10b0c120</guid>
      <pubDate>Mon, 01 Jun 2009 10:28:45 GMT</pubDate>
    </item>
    <item>
      <title>Our Web Design Process</title>
      <description>&lt;div&gt;&lt;span&gt;&lt;a href="http://www.sitefinitywatch.com/blog.aspx"&gt;Gabe Sumner&lt;/a&gt; posted a very interesting blog post last week in which he described two different processes of how designers and other companies work with Sitefinity to build web sites.  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm sure there are a multitude of different processes that are used, in general, at Habanero our process is focused around usability, and although or process has elements of both of the ones Gabe described, ours has one extra role, that as a developer I would be lost with out, and our solutions would be weaker as a result.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Our process:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1.  BAs, IAs and Designers interact with the client to gather information needed to figure out what is needed and wanted.  Many processes are used to sift through this information to come up with the content and design themes, these include but are not limited to card sorting, the &lt;span&gt;&lt;a href="http://ueblog.habaneros.com/2009/05/12/h-pack-plans-of-steel/"&gt;"H-Pack"&lt;/a&gt;&lt;/span&gt; and usability testing.&lt;/div&gt;&lt;div&gt;2.  IAs outline the what and how of the site.  What links go where, how information is laid out on each page and throughout the site, they provide wire frames.&lt;/div&gt;&lt;div&gt;3.  Designers work with the wire frames and create mockups based on them that show what each page will look like when completed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All the output from the above, plus content is given to the UE Devs and Developers...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4.  User Experience Devs (UE Devs) take the mockups and create all the front end functionality, CSS, Javascript, AJAX, &lt;span&gt;Semantic HTML , Accessible markup etc.  They make the site look exactly like the mockups.  They also have a knowledge of the .NET Framework.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;5.  Developers are working in parallel to the UE Devs to create the data access layers, business logic layers and to wire up all the front end work from the UE Devs with the back end.  This is what I do.  I would be lost without the UE Devs.&lt;/div&gt;&lt;div&gt;6.  PMs manage the entire process, budget and all tasks that need to be completed at a high level, as well as main contact with the client.  We all have direct contact with the client however - we are all consultants.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I think the UE Devs are a really import part of the process and are the main thing that I see that is different when I talk to people at other organizations who are creating web sites.  In most organizations, there are some developers who take on part of this role, but having people who are dedicated to the art and science of all that is the front end makes our solutions that much better.  We can all concentrate on what we do best.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Our web sites are almost always actually web applications, with customizations to the CMS platform and custom data sources.  Usually they involve one or more integration points as well.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can read more about User Experience at the &lt;span&gt;&lt;a href="http://ueblog.habaneros.com"&gt;Habanero UE Blog&lt;/a&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://www.sitefinitywatch.com/blog/09-05-22/Speak_Up_Describe_your_Web_Design_Process.aspx"&gt;http://www.sitefinitywatch.com/blog/09-05-22/Speak_Up_Describe_your_Web_Design_Process.aspx&lt;/a&gt;&lt;br /&gt;</description>
      <link>http://sitefinity.habaneros.com/Default/09-05-25/Our_Web_Design_Process.aspx</link>
      <author>Adam Crandall</author>
      <comments>http://sitefinity.habaneros.com/Default/09-05-25/Our_Web_Design_Process.aspx</comments>
      <guid isPermaLink="false">292af09e-747a-41e1-ac21-e2c2af7c3329</guid>
      <pubDate>Mon, 25 May 2009 17:16:01 GMT</pubDate>
    </item>
    <item>
      <title>Upgrading to Sitefinity 3.6 SP1 - The good and the bad (mostly the good)</title>
      <description>&lt;div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: left; word-wrap: break-word; "&gt;&lt;div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: left; word-wrap: break-word; "&gt;&lt;div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: left; word-wrap: break-word; "&gt;We are currently working on a large Sitefinity Implementation for a Restaurant chain.  It is fairly complex with a lot of customizations.  The final site will have over 600 editors with varying levels of permissions, and be viewed by 1000s each day.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We started with Sitefinty 3.6, the day it was released.  We found a few bugs, specifically surrounding custom file library types and security issues with Generic Content, as promised, they have been fixed in Sitefinity 3.6 SP1. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We have had a few hicups with the upgrade th SP1, and we are also happy about some great bug fixes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First, the bad.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;h2&gt;Downloading the patch&lt;/h2&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;This was a small oversite, but the file posted up as the standard edition patch for .Net 3.5 was not correct.  It was actually the .Net 2.0 patch.  It was fixed quickly once I reported it (thanks &lt;span&gt;&lt;a href="www.sitefinitywatch.com"&gt;Gabe!&lt;/a&gt;&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;h2&gt;Custom CSS&lt;/h2&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;We have a lot of custom CSS, JavaScript, Jquery etc for this site.  It seems that the markup output by the Telerik controls has changed and now our CSS has to be re-worked.  Although this is acceptable, there was no mention of this in the release notes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;h2&gt;Page Language Versions&lt;/h2&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;We have some custom code that creates pages for us in english and in french.  We then rely on being able to get the specific page by the language version programatically.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We have been simply getting the page by name as a Telerik.Cms.Data.CmsPage object.  This object has a LanguageVersions Dictionary property which we check to see if it contains a key with the same value as the current UI Cultrures LCID.  For english ("en") the LCID is 9.  Unfortunately, when the english version is returned in SP1, the LCID is 127 - Invariant Culture.  This occurs when we create the page directly through the Sitefinity UI as well.  This seems like a bug and not an intended change.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I hope that in the future Telerik and Sitefinity can minimize some of these things, or at least be very clear what has changed, specifically:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul id="false"&gt; &lt;li&gt;Have a specific list of changed items in the Web.config.  Simply giving a new web.config does not work as we have changed ours quite a bit.  Knowing exactly what has changed would help a lot.&lt;/li&gt;&lt;/ul&gt;&lt;ul id="false"&gt; &lt;li&gt;Combine or at least link to release notes for the Telerik controls when those are updated as part of a new release.  We always run the version of the Telerik controls that comes with the Sitefinty release to make sure there are no problems with version conflicts.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The good.  Bugfixes.&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;h2 style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Custom Edit Views for Custom Library types&lt;/h2&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Prior to Version 3.6, we had the ability to create custom edit and insert templates for custom libraries.&lt;/div&gt;&lt;div&gt;ex: &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If I have a custom library type called "MyLibrary", I could have created:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ControPanelEdit_MyLibrary.ascx.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Not having this functionality would mean a lot of custom branching code... not fun and not scalable.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm very happy with the fix that the Sitefinity Team provided in SP1.  I've tested this and it works.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;After you have created your custom library type you need to use the following properties to specify the path to your custom template&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;libraryItemEditTemplatePath&lt;/div&gt;&lt;div&gt;libraryItemBatchEditTemplatePath&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; background-color: rgb(255, 255, 255); border-top-width: 0px; border-left-width: 0px; border-right-color: rgb(153, 153, 153); border-right-width: 1px; border-right-style: dashed; border-bottom-color: rgb(153, 153, 153); border-bottom-width: 1px; border-bottom-style: dashed; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;add &lt;/span&gt;&lt;span style="color: red; "&gt;name&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"Custom"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;libraryItemEditTemplatePath&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"~/CustomTemplates/ItemEditTemplate.ascx"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;title&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"Custom Library"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;defaultExtenstions&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;".*"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;metaKeys&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"Author, Description, Extension, Name, Size, Category"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;add&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This works great and is very easy to implement.  Just copy the existing template, rename it and change away.  When an item is uploaded to a library of the type you defined, your custom template will be used.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;h2"&gt;Generic Content Security Issues&lt;/h2&gt;&lt;div&gt;&lt;div&gt;There is a security issue in Sitefinity 3.6 as follows:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1.  Create a user in a new role&lt;/div&gt;&lt;div&gt;2.  Deny that role any permissons to Generic content module&lt;/div&gt;&lt;div&gt;3.  Allow that role to have CMSAccess and to edit a page&lt;/div&gt;&lt;div&gt;4.  Create a shared generic content item.&lt;/div&gt;&lt;div&gt;5.  Go to the page that the user can edit (still logged in as admin) and add a generic content control to that page.  Set it to use the shared generic content you just created.&lt;/div&gt;&lt;div&gt;6.  logout and log back in as the new user&lt;/div&gt;&lt;div&gt;7.  Go to edit the page&lt;/div&gt;&lt;div&gt;8.  click the edit on the generic content control&lt;/div&gt;&lt;div&gt;9.  I can edit and save the shared generic content item.  The update carriest to the shared generic content.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I should not be able to do this.  I should be able to view the item, and I should be able to change the control to use a branched version or a non-shared generic content, but I should not be able to update the shared generic content as i'm denied all permissions for modify etc. on the module.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm very happy that this is fixed.  Now when the user above goes to edit the generic content item, they are told they do not have permissions to edit the shared content, and are given the option to branch the content.  The branched content is now non-shared.  This action also triggers the page workflow, requiring an approval before the change goes live.  Great work!&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
      <link>http://sitefinity.habaneros.com/Default/09-04-21/Upgrading_to_Sitefinity_3_6_SP1_-_The_good_and_the_bad_mostly_the_good.aspx</link>
      <author>Adam Crandall</author>
      <comments>http://sitefinity.habaneros.com/Default/09-04-21/Upgrading_to_Sitefinity_3_6_SP1_-_The_good_and_the_bad_mostly_the_good.aspx</comments>
      <guid isPermaLink="false">512b30b0-8c67-4c6e-90f0-71a11e8132ae</guid>
      <pubDate>Tue, 21 Apr 2009 15:47:56 GMT</pubDate>
    </item>
    <item>
      <title>Page Meta Data - Intercepting Sitefinity</title>
      <description>&lt;div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: left; word-wrap: break-word; "&gt;&lt;div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: left; word-wrap: break-word; "&gt;&lt;div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: left; word-wrap: break-word; "&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: left; word-wrap: break-word; "&gt;&lt;div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: left; word-wrap: break-word; "&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: left; word-wrap: break-word; "&gt;&lt;div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: left; word-wrap: break-word; "&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: left; word-wrap: break-word; "&gt;&lt;div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: left; word-wrap: break-word; "&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;Our Team Foundation Server is currently offline, we've been having issues with the SAN that our TFS DB sits on.  This gives me a great opportunity to write a blog post I've been meaning to write for about a month and a half.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;One thing that we really wish for out of the box from Sitefinity is meta data at the page level.  Sometimes there are pages that you need to store information with.  We had this exact situation come up in two recent projects, and we decided to take matters into our own hands.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While re-building our own webiste (which has not been launched yet), we wanted to have the ability to create project pages.  These are pages that all have the same layout, and same types of content:&lt;/div&gt;&lt;div&gt;&lt;ul id="false"&gt; &lt;li&gt;Project Name&lt;/li&gt; &lt;li&gt;Some text&lt;/li&gt; &lt;li&gt;Images/Videos/Files&lt;/li&gt; &lt;li&gt;Case study links&lt;/li&gt; &lt;li&gt;Client testimonials&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;The issue with this was where they should "live" on the site.  We wanted to be able to display a list of projects based on criteria:&lt;/div&gt;&lt;div&gt;&lt;ul id="false"&gt; &lt;li&gt;Client XYZ Projects&lt;/li&gt; &lt;li&gt;Projects related to a technology&lt;/li&gt; &lt;li&gt;Projects related to a practice area&lt;/li&gt; &lt;li&gt;Some other future criteria&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;We decide early on that Projects were really just pages, and not some new content type that iteself had other related content types... that is after all what a page really is already.  The problem here was this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"How do we categorize or tag pages with this information?"  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We needed to be able to have meta data assigned to a page.  Just like we have metadata that can be added to generic content items and generic content based items (Events, News etc.).  Unfortunately, there is no way to do this out of the box.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What we decided to do has worked quite well, it is not perfect but is proving to work well in this case, and may be usefull to others.  I'm not able to post the entire source code at this time, but I can give a very good idea of what is needed in order to implement a simmilar solution in your project.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Our solution consists of:&lt;/div&gt;&lt;div&gt;&lt;ul id="false"&gt; &lt;li&gt;Two custom database tables&lt;/li&gt; &lt;li&gt;a .cs codebehind file tagged onto /Sitefinity/Admin/ControlTemplates/Pages/PagePropertiesInsert.ascx and PagePropertiesEdit.ascx &lt;/li&gt;&lt;/ul&gt;&lt;div&gt;I call what we do with the above "intercepting Sitefinty", but my colleague Daniel says we're Hacking!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Our tables look like this:&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;img src="/Libraries/Screen_Shots/Page_Meta_Data_Tables.sflb.ashx" style="width: 550px; " /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please note that this is not a fully optimized and normalized set of tables.  But we have reason for that and I'll explain later.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The table where we store the Page Meta Data is CmsPageMetaData.  We relate the meta data to a page through the Page's Id (Guid).  This table allows us to store any number of key/value pairs for a given page.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The other table is used to present the user options to choose from when setting up the page.  This table is not necessary, you could just allow the end user to type in whatever they want for the MetaFieldName, but we wanted more control over the Meta Field Names so that we could do predetermined searches throughout our site.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Those of you who have noted that we have a "MetaDataOptionsId" on our MetaDataOptions table but that we are not using in our CmsPageMetaData table, you found what I was referring to earlier about this not being fully normalized.  The reason we are not using the MetaDataOptionsId in the CmsPageMetaData table in order to link this together is for a couple of reasons.  One, we wanted to allow ad-hoc meta data field names that don't exist in the options table, we could allow both, but it became complicated.  Complicated is bad.  Next, wanted this to be simple, and that meant that if we no longer wanted a certain option in the option table, we wanted to be able to delete it.  We would not be able to delete an option from that table if without also deleting all the associated meta data if we were using the MetaDataOptionsId in the CmsPageMetaData table.  We did not want to loose this historical meta data.  We may want to stop new pages from choosing a certain field name, but not loose the meta data on old pages.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now that we had our data storage setup, we needed to start altering the Control templates.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As a point of reference, here is a snippet of our final page insert template in action:&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;img src="/Libraries/Screen_Shots/Page_Meta_Data_on_Page_Insert.sflb.ashx" style="width: 550px; height: 516px; " /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To acheive the above, we altered the markup on two of the built in control templates&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;PagePropertiesInsert.ascx&lt;br /&gt;&lt;/div&gt;&lt;div&gt;PagePropertiesEdit.ascx&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We added the drop down boxes, combo boxes, text boxes and the "Is Project Page" checkbox.  We also added a code behind file to each control template. This allowed us to listen to and intercept events from items on this template, in our case we were interested in the "Create This Page" button.  We needed to do some magic when the user clicked this button.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In order to get the codebehind to work with the .ascx file, you will need to add a Control directive to the ascx file as follows:&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; background-color: rgb(255, 255, 255); border-top-width: 0px; border-left-width: 0px; border-right-color: rgb(153, 153, 153); border-right-width: 1px; border-right-style: dashed; border-bottom-color: rgb(153, 153, 153); border-bottom-width: 1px; border-bottom-style: dashed; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;%@ Control &lt;/span&gt;&lt;span style="color: red; "&gt;Language&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"C#"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;AutoEventWireup&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"true"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;CodeFile&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"PagePropertiesInsert.ascx.cs"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;&lt;span style="color: red; "&gt;Inherits&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"Sitefinity_Admin_ControlTemplates_Pages_PagePropertiesInsert"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; %&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, create a new file called PagePropertiesInsert.ascx.cs in the same folder as the PagePropertiesInsert.ascx file.  This new .cs file should be a class file decalred as follows:&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; background-color: rgb(255, 255, 255); border-top-width: 0px; border-left-width: 0px; border-right-color: rgb(153, 153, 153); border-right-width: 1px; border-right-style: dashed; border-bottom-color: rgb(153, 153, 153); border-bottom-width: 1px; border-bottom-style: dashed; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: blue; "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; partial &lt;/span&gt;&lt;span style="color: blue; "&gt;class&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Sitefinity_Admin_ControlTemplates_Pages_PagePropertiesInsert : System.Web.UI.UserControl  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;{  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;     &lt;span style="color: green; "&gt;//events, methods, etc. go here. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;}  &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In order to catch the "Create This Page" button event, we need to fine the LinkButton with ID "SaveButton" in the .ascx file and add OnClick="SaveButton_Click" to it's decleration.&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; background-color: rgb(255, 255, 255); border-top-width: 0px; border-left-width: 0px; border-right-color: rgb(153, 153, 153); border-right-width: 1px; border-right-style: dashed; border-bottom-color: rgb(153, 153, 153); border-bottom-width: 1px; border-bottom-style: dashed; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;asp:LinkButton &lt;/span&gt;&lt;span style="color: red; "&gt;ID&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"SaveButton"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;CommandName&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"Submit"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;runat&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"server"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;CssClass&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"CmsButLeft okdark"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                &lt;span style="color: red; "&gt;ValidationGroup&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"PageProperties"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;OnClick&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"SaveButton_Click"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;     &lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;strong &lt;/span&gt;&lt;span style="color: red; "&gt;class&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"CmsButRight dark"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;asp:Literal &lt;/span&gt;&lt;span style="color: red; "&gt;runat&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"server"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: red; "&gt;Text&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: blue; "&gt;"&amp;lt;%$Resources:CreateThisPage %&amp;gt;"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;asp:Literal&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: black; "&gt;strong&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;&lt;span style="color: blue; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;asp:LinkButton&lt;/span&gt;&lt;span style="color: blue; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now in the .cs file, add the following event handler.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; background-color: rgb(255, 255, 255); border-top-width: 0px; border-left-width: 0px; border-right-color: rgb(153, 153, 153); border-right-width: 1px; border-right-style: dashed; border-bottom-color: rgb(153, 153, 153); border-bottom-width: 1px; border-bottom-style: dashed; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: blue; "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; SaveButton_Click(&lt;/span&gt;&lt;span style="color: blue; "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; sender, EventArgs e)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.PageTypeOptions.SelectedValue == &lt;/span&gt;&lt;span style="color: blue; "&gt;"0"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.IsProjectPageCheckBox.Checked)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            CmsManager cmsManager = &lt;span style="color: blue; "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; CmsManager();  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: green; "&gt;//get the currently selected page in the page tree as it will be the new page's parent page &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            SiteMapPanel siteMapPanel = (SiteMapPanel)&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Page.Controls[0].Controls[1].FindControl(&lt;/span&gt;&lt;span style="color: blue; "&gt;"ContentPlaceHolder1"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;).FindControl(&lt;/span&gt;&lt;span style="color: blue; "&gt;"siteMap"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            Guid pageId = siteMapPanel.SelectedPageID;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: green; "&gt;//check if a page with the same name in this group already exists &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: blue; "&gt;bool&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; createpage = &lt;/span&gt;&lt;span style="color: blue; "&gt;true&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: blue; "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (SitefinityUtility.PageExists(pageId, &lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.PageName.Text))  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.message.Message = &lt;/span&gt;&lt;span style="color: blue; "&gt;"The specified parent page already contains a page with the same name"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                createpage = &lt;span style="color: blue; "&gt;false&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: blue; "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (createpage)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                &lt;span style="color: blue; "&gt;bool&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; showInNavigation = (&lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Navigable.SelectedIndex == 0);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                &lt;span style="color: green; "&gt;//use the ProjectFactory class to create the page and save the metadata &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                Guid projectPageId = ProjectFactory.CreateProject(pageId, &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.PageName.Text, &lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.MenuLabel.Text,  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                     showInNavigation, GetMetaFields(), &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Title.Text, &lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Description.Text, &lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Keywords.Text);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                &lt;span style="color: green; "&gt;// Redirects to the newly created page in edit mode &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                ICmsPage projectPage = (ICmsPage)cmsManager.GetPage(projectPageId);  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                Response.Redirect(&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Format(&lt;/span&gt;&lt;span style="color: blue; "&gt;"{0}?cmspagemode=edit"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, projectPage.StaticUrl));  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    }  &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here we handle the click event, we check if a page with the same name already exists, we then call our helper class "ProjectFactory" to create the page and save the meta data.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We are calling a method in the call to ProjectFactory.CreatePage called GetMetaFields.  What this method does is simply look at all combo boxes and drop down lists and create a dictionary object that contains all the seleted values.  This way we can pass one object to the factory and the factory can loop through all of that dictionarie's content to in order to save the metafields to our custom db table.  The helper methods that are used for building this list:&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; background-color: rgb(255, 255, 255); border-top-width: 0px; border-left-width: 0px; border-right-color: rgb(153, 153, 153); border-right-width: 1px; border-right-style: dashed; border-bottom-color: rgb(153, 153, 153); border-bottom-width: 1px; border-bottom-style: dashed; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: green; "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// gets the metafield dictionary based on the user input &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: blue; "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Dictionary&amp;lt;&lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[]&amp;gt; GetMetaFields()  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        Dictionary&amp;lt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[]&amp;gt; metaFields = &lt;/span&gt;&lt;span style="color: blue; "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Dictionary&amp;lt;&lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[]&amp;gt;();  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddItemToList(metaFields, &lt;/span&gt;&lt;span style="color: blue; "&gt;"solutionarea"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.SolutionAreaListBox.Items);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddItemToList(metaFields, &lt;/span&gt;&lt;span style="color: blue; "&gt;"servicetype"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ServiceTypeListBox.Items);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddItemToList(metaFields, &lt;/span&gt;&lt;span style="color: blue; "&gt;"technology"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.TechnologyListBox.Items);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddItemToList(metaFields, &lt;/span&gt;&lt;span style="color: blue; "&gt;"ProjectName"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ProjectNameTextBox.Text.Trim());  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddItemToList(metaFields, &lt;/span&gt;&lt;span style="color: blue; "&gt;"ProjectSummary"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.SummaryTextBox.Text.Trim());  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddItemToList(metaFields, &lt;/span&gt;&lt;span style="color: blue; "&gt;"ClientName"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ClientDropDownList.SelectedItem.Text);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddItemToList(metaFields, &lt;/span&gt;&lt;span style="color: blue; "&gt;"ClientId"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ClientDropDownList.SelectedValue);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.AddItemToList(metaFields, &lt;/span&gt;&lt;span style="color: blue; "&gt;"FeaturedProject"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;"true"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; metaFields;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;///  &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;param name="metaFields"&amp;gt;&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;param name="key"&amp;gt;&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;param name="items"&amp;gt;&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: blue; "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; AddItemToList(IDictionary&amp;lt;&lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[]&amp;gt; metaFields, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; key, ListItemCollection items)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        List&amp;lt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt; itemsArray = &lt;/span&gt;&lt;span style="color: blue; "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; List&amp;lt;&lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;();  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;foreach&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (ListItem item &lt;/span&gt;&lt;span style="color: blue; "&gt;in&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; items)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: blue; "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (item.Selected.Equals(&lt;/span&gt;&lt;span style="color: blue; "&gt;true&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;))  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                itemsArray.Add(item.Value);  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        metaFields.Add(key, itemsArray.ToArray());  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;///  &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;param name="metaFields"&amp;gt;&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;param name="key"&amp;gt;&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;param name="value"&amp;gt;&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: blue; "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; AddItemToList(IDictionary&amp;lt;&lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[]&amp;gt; metaFields, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; key, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; value)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[] tmpArr = { value };  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        metaFields.Add(key, tmpArr);  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    }  &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Our project factory does a lot of things, it creates a new page, adds some default controls to the page (so that we don't have to) and calls our page metadata service to save the meta data.  Here is a cut down version of what it looks like:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; background-color: rgb(255, 255, 255); border-top-width: 0px; border-left-width: 0px; border-right-color: rgb(153, 153, 153); border-right-width: 1px; border-right-style: dashed; border-bottom-color: rgb(153, 153, 153); border-bottom-width: 1px; border-bottom-style: dashed; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: blue; "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;static&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Guid CreateProject(Guid parentId, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; pageName, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; menuLabel, &lt;/span&gt;&lt;span style="color: blue; "&gt;bool&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; showInNavigation, Dictionary&amp;lt;&lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[]&amp;gt; metaFields, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; title, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; description, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; keywords) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; projectName = metaFields[&lt;/span&gt;&lt;span style="color: blue; "&gt;"ProjectName"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;][0]; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            CmsManager cmsManager = &lt;span style="color: blue; "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; CmsManager(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: green; "&gt;// Create the project page&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            ICmsPage projectPage = cmsManager.CreatePage(pageName, parentId); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage.MenuName = menuLabel; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage.Navigable = showInNavigation; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage.Staged.SetTemplate(cmsManager.GetTemplate(&lt;span style="color: blue; "&gt;"Project"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;).ID, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Empty); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage.Description = description; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage.Title = title; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage.Keywords = keywords; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage.DenyIndexing = &lt;span style="color: blue; "&gt;false&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage.DenyAnonymous = &lt;span style="color: blue; "&gt;false&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage.RequireCaching = &lt;span style="color: blue; "&gt;false&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: green; "&gt;//TODO:  Allow head tags and links to be saved&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: green; "&gt;// Set the page meta data&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            PageMetaDataService.Save(metaFields, projectPage.ID); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: green; "&gt;// Add a Generic Content control for the main project text in the Main area&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            GenericContent mainContent = &lt;span style="color: blue; "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; GenericContent(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage.Staged.AddControl(&lt;span style="color: blue; "&gt;"Main"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, mainContent); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage = (ICmsPage)cmsManager.GetPage(projectPage.ID, &lt;span style="color: blue; "&gt;true&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;             &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: green; "&gt;// Check in and publish the project page&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage.Staged.CheckIn(); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            projectPage.Publish(); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: blue; "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; projectPage.ID; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        } &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And our PageMetaDataService.Save method simply saves the meta data fields to our custom db.  We are using LINQ to SQL for our data layer, but you could use any of the many Microsoft data access technologies.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; background-color: rgb(255, 255, 255); border-top-width: 0px; border-left-width: 0px; border-right-color: rgb(153, 153, 153); border-right-width: 1px; border-right-style: dashed; border-bottom-color: rgb(153, 153, 153); border-bottom-width: 1px; border-bottom-style: dashed; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: green; "&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: green; "&gt;/// Saves each value in the array associated with each key.&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: green; "&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: green; "&gt;/// &amp;lt;param name="metaFields"&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: green; "&gt;/// &amp;lt;param name="cmsPageId"&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;static&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Save(Dictionary&amp;lt;&lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[]&amp;gt; metaFields, Guid cmsPageId) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: blue; "&gt;foreach&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; metFieldName &lt;/span&gt;&lt;span style="color: blue; "&gt;in&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; metaFields.Keys) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                &lt;span style="color: blue; "&gt;foreach&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; metaFieldValue &lt;/span&gt;&lt;span style="color: blue; "&gt;in&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; metaFields[metFieldName]) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                    CmsPageMetaData metaData = &lt;span style="color: blue; "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; CmsPageMetaData(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                    metaData.CmsPageId = cmsPageId; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                    metaData.CmsPageMetaDataId = Guid.NewGuid(); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                    metaData.MetaFieldName = metFieldName; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                    metaData.MetaFieldValue = metaFieldValue; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                     &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                   &lt;span style="color: green; "&gt;//this is where you will call your data access technology to save this to your custom table.&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;                } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        } &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;**note, I have not shown our saving code as it is trivial and really up to your personal preference as to how you want to deal with access to this database.  Also, ours calls three more methods before actually saving and I did not want to take up all that space on this post.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So now we have our meta data saved.  The next thing we do is override the page load event on the PagePropertiesInsert.ascx.cs file in order to bring our meta data options to our lists and combo boxes.&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="overflow-x: auto; overflow-y: auto; background-color: white; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); line-height: 100% !important; font-family: 'courier new'; font-size: 11px; "&gt;&lt;table cellpadding="0" cellspacing="0" style="width: 99%; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; border-collapse: collapse; background-color: rgb(255, 255, 255); border-top-width: 0px; border-left-width: 0px; border-right-color: rgb(153, 153, 153); border-right-width: 1px; border-right-style: dashed; border-bottom-color: rgb(153, 153, 153); border-bottom-width: 1px; border-bottom-style: dashed; "&gt; &lt;col style="font-family: 'courier new'; font-size: 11px; padding-left: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); white-space: nowrap; " /&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;override&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; OnLoad(EventArgs e) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.SolutionAreaListBox.Items.Count &amp;lt;= 0) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: green; "&gt;// Load the meta data options&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.BindMetaDataOptions(&lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.SolutionAreaListBox, &lt;/span&gt;&lt;span style="color: blue; "&gt;"SolutionArea"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.BindMetaDataOptions(&lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ServiceTypeListBox, &lt;/span&gt;&lt;span style="color: blue; "&gt;"ServiceType"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;            &lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.BindMetaDataOptions(&lt;/span&gt;&lt;span style="color: blue; "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.TechnologyListBox, &lt;/span&gt;&lt;span style="color: blue; "&gt;"Technology"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        &lt;span style="color: blue; "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.OnLoad(e); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// gets the options for each drop downlist on the page representing a custom metadata entry&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: green; "&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    &lt;span style="color: blue; "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: blue; "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BindMetaDataOptions(ListControl list, &lt;/span&gt;&lt;span style="color: blue; "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; groupName) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    { &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        list.DataSource = MetaDataOptionsService.GetMetaDataOptions(groupName); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        list.DataTextField = &lt;span style="color: blue; "&gt;"MetaDataOptionsValue"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        list.DataValueField = &lt;span style="color: blue; "&gt;"MetaDataOptionsValue"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;        list.DataBind(); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt;    } &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; border-top-color: rgb(153, 153, 153); border-top-width: 1px; border-top-style: dashed; border-left-color: rgb(153, 153, 153); border-left-width: 1px; border-left-style: dashed; "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That is it, now we can do searches against our custom table for say, all pages with a value of "SQL Server" for meta field name "Technology".  We will be returned a list of PageIds and we can then get each of those page urls from the CmsManager.  We use these to populate even more custom controls that display a summary of the project page on another page, and for some special navigation that we have on the site.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Some things I have not shown here that we also do:&lt;/div&gt;&lt;div&gt;&lt;ul id="false"&gt; &lt;li&gt;We allow this to all be edited by replication the changes above to the PagePropertiesEdit.ascx template&lt;/li&gt; &lt;li&gt;When a page is deleted, we delete the associated meta data so that the db does not get clutered&lt;/li&gt; &lt;li&gt;We enable / disable the custom lists and text boxes on the insert and edit pages when the "Is Project Page" checkbox is checked/unchecked&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Is this the perfect solution?  No, probably not, an out of the box solution would be perfect.  Is this perfectly executed?  No, there is probably room for improvement.  But, this does work for now and allows us to do what we so desperately needed to do.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please feel free to ask questions or comment on this.  Again, sorry for not having a complete source code example, it is just so weaven into our site that I'll need to take the time to pull it out into another solution first.  My goal with this post was to let people have an idea of what we are doing, how we are doing, and hopefull get you to think of what other ways you can "Intercept Sitefinity".&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
      <link>http://sitefinity.habaneros.com/Default/09-02-17/Page_Meta_Data_-_Intercepting_Sitefinity-769469583.aspx</link>
      <author>Adam Crandall</author>
      <comments>http://sitefinity.habaneros.com/Default/09-02-17/Page_Meta_Data_-_Intercepting_Sitefinity-769469583.aspx</comments>
      <guid isPermaLink="false">bef5672c-c828-4bbf-903b-5bbcfff3031c</guid>
      <pubDate>Tue, 17 Feb 2009 19:31:12 GMT</pubDate>
    </item>
    <item>
      <title>Sitefinity 3.6 Released - Initial thoughts</title>
      <description>&lt;div style="padding-right: 3px; padding-left: 3px; background-image: none; padding-bottom: 3px; margin: 0px; padding-top: 3px; text-align: left; word-wrap: break-word"&gt;Well, after a long wait, Telerik has released their latest minor release of the Sitefinity CMS.
&lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt;There are a slew of new features included in version 3.6, and a couple have got us quite excited:&lt;/div&gt; &lt;div&gt; &lt;ul id="false"&gt; &lt;li&gt;Video Libraries &lt;/li&gt; &lt;li&gt;Dynamic Links &lt;/li&gt; &lt;li&gt;Embedded Control Templates &lt;/li&gt; &lt;li&gt;Custom Module creation is simplified and more powerfull&lt;/li&gt; &lt;/ul&gt; &lt;div&gt;&lt;span&gt; &lt;h1 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px 0px 10px; padding-top: 0px"&gt;&lt;span&gt; &lt;h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px 0px 10px; padding-top: 0px"&gt;&lt;span&gt; &lt;h3&gt;Video Libraries&lt;/h3&gt; &lt;/span&gt;&lt;/h2&gt; &lt;/span&gt;&lt;/h1&gt; &lt;/span&gt;&lt;/div&gt; &lt;div&gt;The addition of integrated Video libraries makes things a little more streamlined over how we at Habanero have been implementing Video libraries on our sites.  Mostly the inclusion of the Silverlight RadMediaPlayer makes our lives a lot easier for clients willing to make an investiment in Silverlight on their websites.  For those clients who still require Flash, we will be working on a front end implementation for the Video Libraries that uses a Flash video player.&lt;/div&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt;The other exciting feature coming with video Libraries is video storage providers.  Included in the release are providers for Amazon S3 and Viddler.  We are hoping to see providers for Silverlight Streaming.  I have not investigated yet, but I'm thinking we should be able to create our own providers for video as well, so if we want to use some custom video storage, we should be able to plug that right in.&lt;/div&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt;&lt;span&gt; &lt;h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px 0px 10px; padding-top: 0px"&gt;&lt;span&gt; &lt;h3&gt;Dynamic Links&lt;/h3&gt; &lt;/span&gt;&lt;/h2&gt; &lt;/span&gt;&lt;/div&gt; &lt;div&gt;To me this is more of a fix than a feature.  Pior to 3.6, if you inserted a link into a blog post for instance, and that link pointed to a page in your Sitefinity website, you had a problem if the page you linked to moved or changed it's name.  Now if this page information changes, the links will continue to function.  This should make our clients very happy!&lt;/div&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt;&lt;a href="http://www.sitefinitywatch.com/blog/09-02-16/Why_Broken_URLs_are_a_Bad_Thing.aspx"&gt;Here &lt;/a&gt;is a great write up by Gabe Sumner of Telerik that explains the new functionality.&lt;/div&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt;&lt;span&gt; &lt;h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px 0px 10px; padding-top: 0px"&gt;&lt;span&gt; &lt;h3&gt;Embedded Control Templates&lt;/h3&gt; &lt;/span&gt;&lt;/h2&gt; &lt;/span&gt;Prior to 3.6, all the templates for the Sitefinity Controls lived in ~/SiteFinity/ControlTemplates/ModuleName.  The great thing about this was that it was easy to find the templates, and alter their look and feel.  The bad thing was that when SiteFinity released an updated version, all your custom templates would be overriden, so it made upgrading much more time consuming and prone to loss of customizations.&lt;/div&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt;At Habanero, we had worked around this by creating another project in our Visual Studio solution.  This project had a folder structure that mimicked the Sitefinity folder structure.  We would copy our templates here into the corresponding folder and then we added a post build event on the project that simply did an xcopy of our customized templates into the Sitefinity folder in our web project.  This worked pretty well and made sure we would not loose customizations.  Where it fell short was when we needed to extend the functionality of template by adding a code behind class.  We would do this when we needed to intercept say the click event on a save button to run some custom workflow.  The problem was that we could not now move these templates to our other project easily due to namespace issues.&lt;/div&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt;This change should really improve this process.  We can now keep our custom templates in the web project in another folder, and simply tell Sitefinity where to find them using the configuration file.&lt;/div&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt;&lt;span&gt; &lt;h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px 0px 10px; padding-top: 0px"&gt;&lt;span&gt; &lt;h3&gt;Custom Module creation is simplified and more powerfull&lt;/h3&gt; &lt;/span&gt;&lt;/h2&gt; &lt;/span&gt;&lt;/div&gt; &lt;div&gt;This change should prove to allow us to easily create more compelling custom modules.  We have stayed away from making complex modules due to the time and complexity involved, the return was not there for us.&lt;/div&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt;With the new architecture we saw watching the webinar last week (I don't have a link to it but i'm sure it will show &lt;span&gt;&lt;a href="http://www.sitefinity.com/support/webinars.aspx"&gt;here &lt;/a&gt;&lt;/span&gt;soon), we should be able to quite easily create scalable, functional, and usable custom modules.  I'm really looking forward to exploring this as we migrate one of our largest projects to 3.6.&lt;/div&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt;Overall the 3.6 release of siteifinity looks to deliver some compelling features and fix some nagging issues (Generic Content issues and workflow issues affected us in 3.4 and 3.5).  We'll see over the next few weeks how the Sitefinity team's hard work translates to our ability to be more productive and provide more compelling end user experiences with Sitefinity.&lt;/div&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt;I'll be blogging about my experiences in upgrading a 3.4 project that is going through a graphical re-design as well as some functional requirements.  A lot of custom code and modifications will be affected so it will be interesting to see what we need to do in order to get everything working in this new release.  So far we have had to update how our custom Library and Events providers function somewhat to handle a slightly new DefaultProvider and Library / Events provider interfaces.  Nothing drastic yet, which is great.&lt;/div&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;/div&gt; &lt;div&gt;You can read the all about the official release here:&lt;/div&gt; &lt;div&gt;&lt;a href="http://blogs.sitefinity.com/Ivan/Posts/09-02-12/Sitefinity_3_6_released.aspx"&gt;http://blogs.sitefinity.com/Ivan/Posts/09-02-12/Sitefinity_3_6_released.aspx&lt;/a&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt; &lt;/div&gt;
</description>
      <link>http://sitefinity.habaneros.com/Default/09-02-16/Sitefinity_3_6_Released_-_Initial_thoughts.aspx</link>
      <author>acrandall</author>
      <comments>http://sitefinity.habaneros.com/Default/09-02-16/Sitefinity_3_6_Released_-_Initial_thoughts.aspx</comments>
      <guid isPermaLink="false">6367da88-079a-4255-9f4c-fa160c07e063</guid>
      <pubDate>Mon, 16 Feb 2009 12:02:49 GMT</pubDate>
    </item>
    <item>
      <title>Amazon S3 Support coming to 3.6</title>
      <description>&lt;p&gt;Mehfuz has a great write up on a new feature coming to Sitefinity in version 3.6 at his blog here &lt;a href="http://weblogs.asp.net/mehfuzh/archive/2009/01/23/amazon-s3-support-in-sitefinity-3-6.aspx"&gt;http://weblogs.asp.net/mehfuzh/archive/2009/01/23/amazon-s3-support-in-sitefinity-3-6.aspx&lt;/a&gt;.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;This feature allows us to create Libraries in Sitefinity that actually store their data on the Amazon S3 servers.  This is a great option for anyone needing to reduced bandwidth usage on their network, or who has a not got the bandwidth needed to serve these large files quickly.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;With the introduction of a new Library type for Videos, and the inclusion of the Telerik Rad Controls for Silverlight, we will be able to create a Video library, store the files on Amazon S3 and have them served up using the Silverlight Video Player control from Telerik.  A very powerful solution.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;Some of my colleagues are not 100% sold on using Silverlight on public facing web sites, so we'll be looking how to integrate these new features into the existing Javascript and Flash players we are currently using.&lt;/p&gt;
</description>
      <link>http://sitefinity.habaneros.com/Default/09-01-26/Amazon_S3_Support_coming_to_3_6.aspx</link>
      <author>Adam Crandall</author>
      <comments>http://sitefinity.habaneros.com/Default/09-01-26/Amazon_S3_Support_coming_to_3_6.aspx</comments>
      <guid isPermaLink="false">072b1bb6-a654-4b3e-955a-e269cde0664a</guid>
      <pubDate>Mon, 26 Jan 2009 12:07:45 GMT</pubDate>
    </item>
    <item>
      <title>Uploading large files to Sitefinity</title>
      <description>&lt;p&gt;By default Sitefinity sets the maximum file upload size of 50 MB. To increase this update the maxRequestLength (in KB) in web.config. Make sure the executionTimeout (seconds) is also long enough: &lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 13px; color: rgb(0, 0, 255); "&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-right-color: rgb(127, 157, 185); border-right-width: 1px; border-right-style: solid; border-top-color: rgb(127, 157, 185); border-top-width: 1px; border-top-style: solid; font-size: 11px; overflow-x: auto; overflow-y: auto; border-left-color: rgb(127, 157, 185); border-left-width: 1px; border-left-style: solid; line-height: 100% !important; border-bottom-color: rgb(127, 157, 185); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; background-color: white; "&gt;&lt;table style="border-top-width: 0px; border-left-width: 0px; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-bottom-color: rgb(238, 238, 238); border-bottom-width: 0px; border-bottom-style: solid; border-collapse: collapse; background-color: rgb(255, 255, 255); border-right-width: 0px; " cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom-color: rgb(247, 247, 247); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;httpRuntime &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;maxRequestLength&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"102400"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0); "&gt;executionTimeout&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"3600"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;/&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;One thing to keep in mind is that if you are using Forms authentication the user may timeout from being logged in while you wait for the file to upload. Set this to a resonable number (in minutes):&lt;span style="font-size: 13px; color: rgb(0, 0, 255); "&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-right-color: rgb(127, 157, 185); border-right-width: 1px; border-right-style: solid; border-top-color: rgb(127, 157, 185); border-top-width: 1px; border-top-style: solid; font-size: 11px; overflow-x: auto; overflow-y: auto; border-left-color: rgb(127, 157, 185); border-left-width: 1px; border-left-style: solid; line-height: 100% !important; border-bottom-color: rgb(127, 157, 185); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; background-color: white; "&gt;&lt;table style="border-top-width: 0px; border-left-width: 0px; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-bottom-color: rgb(238, 238, 238); border-bottom-width: 0px; border-bottom-style: solid; border-collapse: collapse; background-color: rgb(255, 255, 255); border-right-width: 0px; " cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom-color: rgb(247, 247, 247); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0); "&gt;forms&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;name&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;".AUTH"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;loginUrl&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"~/SignIn.aspx"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;protection&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"All"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;timeout&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"60"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;path&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"/"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;requireSSL&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"false"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;slidingExpiration&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"true"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;defaultUrl&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"~/index.aspx"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;cookieless&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"AutoDetect"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;enableCrossAppRedirects&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"false"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;/&amp;gt;  &lt;/span&gt;&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;</description>
      <link>http://sitefinity.habaneros.com/Default/08-09-18/Uploading_large_files_to_Sitefinity.aspx</link>
      <author>Jan Groenendijk</author>
      <comments>http://sitefinity.habaneros.com/Default/08-09-18/Uploading_large_files_to_Sitefinity.aspx</comments>
      <guid isPermaLink="false">35ac8904-6536-483a-a755-54e0922dfd4c</guid>
      <pubDate>Thu, 18 Sep 2008 14:43:00 GMT</pubDate>
    </item>
    <item>
      <title>Create a custom RSS feed with support for the existing Sitefinity RSS feed.</title>
      <description>&lt;p&gt;Recently I needed to create a podcast RSS to Sitefinity without breaking any of the out of the box RSS functionality. &lt;/p&gt; &lt;div class="sfug-CodeBlock"&gt; &lt;p style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt;1. Use the &lt;a href="http://www.codeplex.com/ASPNETRSSToolkit"&gt;RssToolkit&lt;/a&gt;: &lt;/p&gt; &lt;p style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt;Note: 2.0.0.0 has some issues:&lt;/p&gt; &lt;p style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; margin-left: 1.25in; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt;&lt;span&gt;i. &lt;/span&gt;Updated the ContentType response to return: &lt;span style="color: #a31515; font-family: 'courier new'"&gt;application/rss+xml &lt;a href="http://www.codeplex.com/ASPNETRSSToolkit/Thread/View.aspx?ThreadId=12179"&gt;http://www.codeplex.com/ASPNETRSSToolkit/Thread/View.aspx?ThreadId=12179&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; margin-left: 1.25in; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt;&lt;span&gt;ii. &lt;/span&gt;Encoding is utf-16, updated this to utf-8 otherwise it fails validation&lt;/p&gt; &lt;p style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt;You can grab the updated dll here: &lt;a href="http://sitefinity.extraneros.com/assets/rsstoolkit.dll"&gt;http://sitefinity.extraneros.com/assets/rsstoolkit.dll&lt;/a&gt;&lt;/p&gt; &lt;p style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt;2. In the App_Code folder create a sample Podcast.rss file with all the fields you want exposed by your RSS. &lt;/p&gt; &lt;p style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt;For example:&lt;/p&gt; &lt;p style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt;&amp;nbsp;&lt;/p&gt; &lt;div style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt; &lt;table style="border-top-width: 0px; border-left-width: 0px; margin: 2px 0px; width: 99%; border-bottom: rgb(238,238,238) 0px solid; border-collapse: collapse; background-color: rgb(255,255,255); border-right-width: 0px" cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom: rgb(247,247,247) 1px solid; font-family: 'courier new'; white-space: nowrap" /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="font-size: 11px"&gt;xml &lt;/span&gt;&lt;span style="color: #ff0000"&gt;version&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"1.0"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;encoding&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"utf-8"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;?&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;rss &lt;/span&gt;&lt;span style="color: #ff0000"&gt;version&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"2.0"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;channel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: #000000"&gt;title&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;link&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: #000000"&gt;link&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;description&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: #000000"&gt;description&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;ttl&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: #000000"&gt;ttl&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;item&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: #000000"&gt;title&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;description&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: #000000"&gt;description&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;link&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: #000000"&gt;link&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;enclosure &lt;/span&gt;&lt;span style="color: #ff0000"&gt;url&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;""&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;length&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;""&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;""&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;pubDate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: #000000"&gt;pubDate&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px"&gt;item&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;item&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: #000000"&gt;title&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;description&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: #000000"&gt;description&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;link&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: #000000"&gt;link&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;enclosure &lt;/span&gt;&lt;span style="color: #ff0000"&gt;url&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;""&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;length&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;""&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;""&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;pubDate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: #000000"&gt;pubDate&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px"&gt;item&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px"&gt;channel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px"&gt;rss&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;p style="margin-bottom: 0pt; line-height: normal"&gt;&amp;nbsp;&lt;/p&gt; &lt;p style="margin-bottom: 0pt; line-height: normal"&gt;&lt;span&gt;3. &lt;/span&gt;Add the following build providers to your web.config file:&lt;/p&gt; &lt;p style="margin-bottom: 0pt; line-height: normal"&gt;&amp;nbsp;&lt;/p&gt; &lt;span style="font-size: 12pt; font-family: 'times new roman', serif"&gt; &lt;div class="sfug-CodeBlock"&gt; &lt;div style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt; &lt;table style="border-top-width: 0px; border-left-width: 0px; margin: 2px 0px; width: 99%; border-bottom: rgb(238,238,238) 0px solid; border-collapse: collapse; background-color: rgb(255,255,255); border-right-width: 0px" cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom: rgb(247,247,247) 1px solid; font-family: 'courier new'; white-space: nowrap" /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;buildProviders&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;extension&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;".rss"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"RssToolkit.Rss.CodeGeneration.RssBuildProvider,RssToolkit"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;/&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;extension&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;".rssdl"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"RssToolkit.Rss.CodeGeneration.RssdlBuildProvider,RssToolkit"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;/&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px"&gt;buildProviders&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;/span&gt; &lt;p style="margin-bottom: 0pt; line-height: normal"&gt;&lt;span style="font-family: 'times new roman', serif"&gt;When you build your solution you will have access to a strongly type Podcast class.&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0pt; line-height: normal"&gt;&amp;nbsp;&lt;/p&gt; &lt;p style="margin-bottom: 0pt; line-height: normal"&gt;&lt;span&gt;4. &lt;/span&gt;Create a custom library that will hold your RSS content in Sitefinity. To create the custom content type add the following to the web.config&lt;/p&gt; &lt;div class="sfug-CodeBlock"&gt; &lt;div style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt; &lt;table style="border-top-width: 0px; border-left-width: 0px; margin: 2px 0px; width: 99%; border-bottom: rgb(238,238,238) 0px solid; border-collapse: collapse; background-color: rgb(255,255,255); border-right-width: 0px" cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom: rgb(247,247,247) 1px solid; font-family: 'courier new'; white-space: nowrap" /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;libraries &lt;/span&gt;&lt;span style="color: #ff0000"&gt;defaultGenericProvider&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"Libraries"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;. &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;libraryInfo&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;. &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"Podcast"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;title&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"Podcast Library"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;defaultExtenstions&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;".mp3, .mpg4, .m4a"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;metaKeys&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"Author, Title, Description, Name, Extension, Link"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px"&gt;add&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px"&gt;libraryInfo&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px"&gt;libraries&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;In Sitefinity you can now create a new library of Podcast content type.&lt;/p&gt; &lt;p&gt;&lt;span&gt;5. &lt;/span&gt;Create your code file that will populate the RSS feed from the Podcast Library:&lt;/p&gt; &lt;span&gt; &lt;div class="sfug-CodeBlock"&gt; &lt;div style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt; &lt;table style="border-top-width: 0px; border-left-width: 0px; margin: 2px 0px; width: 99%; border-bottom: rgb(238,238,238) 0px solid; border-collapse: collapse; background-color: rgb(255,255,255); border-right-width: 0px" cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom: rgb(247,247,247) 1px solid; font-family: 'courier new'; white-space: nowrap" /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt;&lt;span style="font-size: 11px"&gt; System; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt;&lt;span style="font-size: 11px"&gt; System.Web; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt;&lt;span style="font-size: 11px"&gt; System.Web.UI; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt;&lt;span style="font-size: 11px"&gt; System.Configuration; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt;&lt;span style="font-size: 11px"&gt; System.Collections; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt;&lt;span style="font-size: 11px"&gt; System.Collections.Generic; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt;&lt;span style="font-size: 11px"&gt; RssToolkit.Rss; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt;&lt;span style="font-size: 11px"&gt; Telerik.Cms.Engine; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt;&lt;span style="font-size: 11px"&gt; Telerik.Libraries; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;class&lt;/span&gt;&lt;span style="font-size: 11px"&gt; PodcastRSS : PodcastHttpHandlerBase &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;override&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;&lt;span style="font-size: 11px"&gt; PopulateRss(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="font-size: 11px"&gt; channelName, &lt;/span&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="font-size: 11px"&gt; userName) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;LibraryManager libManager = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt;&lt;span style="font-size: 11px"&gt; LibraryManager(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;ILibrary rssLibarary = libManager.GetLibrary(ConfigurationManager.AppSettings[&lt;span style="color: #0000ff"&gt;"PodcastLibraryName"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;]); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;IList rssList = rssLibarary.GetItems(); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Rss.Version = &lt;span style="color: #0000ff"&gt;"2.0"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Rss.Channel = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt;&lt;span style="font-size: 11px"&gt; PodcastChannel(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Rss.Channel.Title = Resources.Rss.PodcastTitle; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Rss.Channel.Description = Resources.Rss.PodcastDescription; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Rss.Channel.Ttl = ConfigurationManager.AppSettings[&lt;span style="color: #0000ff"&gt;"PodcastTtl"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;]; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Rss.Channel.Link = ResolveUrl(ConfigurationManager.AppSettings[&lt;span style="color: #0000ff"&gt;"PodcastRssUrl"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;]); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt;&lt;span style="font-size: 11px"&gt; (!&lt;/span&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="font-size: 11px"&gt;.IsNullOrEmpty(channelName)) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;Rss.Channel.Title += &lt;span style="color: #0000ff"&gt;" '"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; + channelName + &lt;/span&gt;&lt;span style="color: #0000ff"&gt;"'"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt;&lt;span style="font-size: 11px"&gt; (!&lt;/span&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="font-size: 11px"&gt;.IsNullOrEmpty(userName)) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Rss.Channel.Title += &lt;span style="color: #0000ff"&gt;" (generated for "&lt;/span&gt;&lt;span style="font-size: 11px"&gt; + userName + &lt;/span&gt;&lt;span style="color: #0000ff"&gt;")"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;Rss.Channel.Items = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt;&lt;span style="font-size: 11px"&gt; List&amp;lt;PodcastItem&amp;gt;(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt;&lt;span style="font-size: 11px"&gt; (IContent content &lt;/span&gt;&lt;span style="color: #0000ff"&gt;in&lt;/span&gt;&lt;span style="font-size: 11px"&gt; rssList) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="font-size: 11px"&gt; url = ResolveUrl(content.Url).Replace(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;" "&lt;/span&gt;&lt;span style="font-size: 11px"&gt;, &lt;/span&gt;&lt;span style="color: #0000ff"&gt;"%20"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;) + (&lt;/span&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="font-size: 11px"&gt;)content.GetMetaData(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"Extension"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;PodcastItem item = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt;&lt;span style="font-size: 11px"&gt; PodcastItem(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;item.Title = (&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="font-size: 11px"&gt;)content.GetMetaData(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"Name"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;item.Description = (&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="font-size: 11px"&gt;)content.GetMetaData(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"Description"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;item.Link = url; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;item.Enclosure = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt;&lt;span style="font-size: 11px"&gt; PodcastEnclosure(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;item.Enclosure.Type = content.MimeType; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;item.Enclosure.Length = ((&lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;&lt;span style="font-size: 11px"&gt;[])content.Content).Length.ToString(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;item.Enclosure.Url = url; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;item.PubDate = content.DateCreated.ToString(&lt;span style="color: #0000ff"&gt;"ddd, dd MMM yyyy HH:mm:ss 'GMT'"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Rss.Channel.Items.Add(item); &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="font-size: 11px"&gt; ResolveUrl(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="font-size: 11px"&gt; url) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt;&lt;span style="font-size: 11px"&gt; (url.StartsWith(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"~"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;)) url = VirtualPathUtility.ToAbsolute(url); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt;&lt;span style="font-size: 11px"&gt; (Context.Request.Url.Port == 80) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;span style="color: #0000ff"&gt;return&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="font-size: 11px"&gt;.Format(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"{0}://{1}{2}"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;, Context.Request.Url.Scheme, Context.Request.Url.Host, url); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;span style="color: #0000ff"&gt;return&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="font-size: 11px"&gt;.Format(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"{0}://{1}:{2}{3}"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;, Context.Request.Url.Scheme, Context.Request.Url.Host, Context.Request.Url.Port.ToString(), url); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;/span&gt; &lt;p style="margin-bottom: 0pt; line-height: normal"&gt;&lt;span&gt;6. &lt;/span&gt;Add your feed URL to httpHandlers in the web.config (make sure it is placed before the *.rss handler):&lt;/p&gt; &lt;p style="margin-bottom: 0pt; line-height: normal"&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="sfug-CodeBlock"&gt; &lt;div style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt; &lt;table style="border-top-width: 0px; border-left-width: 0px; margin: 2px 0px; width: 99%; border-bottom: rgb(238,238,238) 0px solid; border-collapse: collapse; background-color: rgb(255,255,255); border-right-width: 0px" cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom: rgb(247,247,247) 1px solid; font-family: 'courier new'; white-space: nowrap" /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;httpHandlers&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;. &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;verb&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"*"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;path&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"podcast.rss"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"PodcastRSS"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;/&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;verb&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"*"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;path&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"*.rss"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"Telerik.Rss.RssHttpHandler, Telerik.Rss"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;/&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;. &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px"&gt;httpHandlers&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;Now when you browse to &lt;a href="http://yoursite/podcast.rss"&gt;http://yoursite/podcast.rss&lt;/a&gt; you should see your podcast feed.&lt;/p&gt; &lt;p&gt;&lt;span&gt;7. &lt;/span&gt;All content is Sitefinity libraries has an extension of .sflb. This is a problem if you want your feed to have the correct file extensions (will not work in iTunes). To get around this you will need to do a silent URL rewrite. Use the default Sitefinity UrlRewriter to do this by adding the following to your web.config:&lt;/p&gt; &lt;div class="sfug-CodeBlock"&gt; &lt;div style="border-right: rgb(127,157,185) 1px solid; border-top: rgb(127,157,185) 1px solid; overflow-y: auto; font-size: 11px; overflow-x: auto; border-left: rgb(127,157,185) 1px solid; line-height: 100%! important; border-bottom: rgb(127,157,185) 1px solid; font-family: 'courier new'; background-color: white"&gt; &lt;table style="border-top-width: 0px; border-left-width: 0px; margin: 2px 0px; width: 99%; border-bottom: rgb(238,238,238) 0px solid; border-collapse: collapse; background-color: rgb(255,255,255); border-right-width: 0px" cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom: rgb(247,247,247) 1px solid; font-family: 'courier new'; white-space: nowrap" /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;rewriterConfiguration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;rewriterRules&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;. &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;lookFor&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"~/(.*).mp3"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;sendTo&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"~/$1.sflb?download=true"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;/&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;lookFor&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"~/(.*).mpg4"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;sendTo&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"~/$1.sflb?download=true"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;/&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;lookFor&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"~/(.*).m4a"&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;sendTo&lt;/span&gt;&lt;span style="font-size: 11px"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;"~/$1.sflb?download=true"&lt;/span&gt;&lt;span style="font-size: 11px"&gt;/&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px"&gt;rewriterRules&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px"&gt;rewriterConfiguration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px"&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247,247,247)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;This will take the url &lt;a href="http://yoursite.com/audiofile.mp3"&gt;http://yoursite.com/audiofile.mp3&lt;/a&gt; and do redirect to &lt;a href="http://yoursite.com/audiofile.sflb?download=true"&gt;http://yoursite.com/audiofile.sflb?download=true&lt;/a&gt;&lt;/p&gt; &lt;p&gt;In order to make this redirect IIS needs to know how to handle a .mp3 file type. In IIS add the .mp3 (and any other file types) into the application mapping and let the aspnet_issapi.dll handle it. Keep in mind that all mp3 files will need to be stored in a Sitefinity library as the mp3's on the file system cannot be linked to directly.&lt;/p&gt; &lt;p&gt;&lt;span&gt;8. &lt;/span&gt;Make sure your feed validates! &lt;a href="http://feedvalidator.org/"&gt;http://feedvalidator.org/&lt;/a&gt; also if you are creating a media feed check it in iTunes.&lt;/p&gt; &lt;p style="margin-left: 0.25in"&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <link>http://sitefinity.habaneros.com/Default/08-09-18/Create_a_custom_RSS_feed_with_support_for_the_existing_Sitefinity_RSS_feed.aspx</link>
      <author>admin</author>
      <comments>http://sitefinity.habaneros.com/Default/08-09-18/Create_a_custom_RSS_feed_with_support_for_the_existing_Sitefinity_RSS_feed.aspx</comments>
      <guid isPermaLink="false">05f50cba-6ddc-4639-9a75-8b479f48113e</guid>
      <pubDate>Thu, 18 Sep 2008 11:32:00 GMT</pubDate>
    </item>
    <item>
      <title>Custom Control Example: BlogList (Part2)</title>
      <description>&lt;p&gt;In &lt;a href="http://sitefinity.extraneros.com/Sitefinity/Admin/~/Default/08-07-09/Custom_Control_Example_BlogList_Part_1.aspx?ReturnURL=%2fDefault.aspx"&gt;Part 1&lt;/a&gt; of this sample, we looked at how to create a custom web control for use in Sitefinity. In Part 2 we will look at how to give this control a customized editor for the end user to use when placing the control on a page.&lt;/p&gt;&lt;p&gt;We will provide a custom editor that looks like this:&lt;/p&gt;&lt;p&gt;&lt;img style="width: 600px; height: 458px; " src="/Libraries/Screen_Shots/BlogList_Designer.sflb.ashx" /&gt;&lt;/p&gt;&lt;p&gt;In Part 1 we discussed the IBlogList interface, here is the code:&lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-right-color: rgb(127, 157, 185); border-right-width: 1px; border-right-style: solid; border-top-color: rgb(127, 157, 185); border-top-width: 1px; border-top-style: solid; font-size: 11px; overflow-x: auto; overflow-y: auto; border-left-color: rgb(127, 157, 185); border-left-width: 1px; border-left-style: solid; line-height: 100% !important; border-bottom-color: rgb(127, 157, 185); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; background-color: white; "&gt;&lt;table style="border-top-width: 0px; border-left-width: 0px; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-bottom-color: rgb(238, 238, 238); border-bottom-width: 0px; border-bottom-style: solid; border-collapse: collapse; background-color: rgb(255, 255, 255); border-right-width: 0px; " cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom-color: rgb(247, 247, 247); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;namespace&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; SHC.UI.WebControls &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// This interface specifies which properties a control must have in order that it can use &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// JobsDesigner. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;interface&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; IBlogList &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; NumberOfBlogs{ &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;set&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; } &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Title { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;set&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; } &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;This interface simply containst the public properties that we need the user to be able to set on the designer. We then make sure both our custom control class and our custom designer class implement this interface, this ensures that the designer will always be forced to have these public properties.&lt;/p&gt;&lt;p&gt;Let's look at the code for our custom designer:&lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-right-color: rgb(127, 157, 185); border-right-width: 1px; border-right-style: solid; border-top-color: rgb(127, 157, 185); border-top-width: 1px; border-top-style: solid; font-size: 11px; overflow-x: auto; overflow-y: auto; border-left-color: rgb(127, 157, 185); border-left-width: 1px; border-left-style: solid; line-height: 100% !important; border-bottom-color: rgb(127, 157, 185); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; background-color: white; "&gt;&lt;table style="border-top-width: 0px; border-left-width: 0px; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-bottom-color: rgb(238, 238, 238); border-bottom-width: 0px; border-bottom-style: solid; border-collapse: collapse; background-color: rgb(255, 255, 255); border-right-width: 0px; " cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom-color: rgb(247, 247, 247); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.IO; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.Collections.Generic; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.ComponentModel; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.Web; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.Web.UI; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.Web.UI.WebControls; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Telerik.Cms.Web.UI; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Telerik.Framework.Web; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;namespace&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; SHC.UI.WebControls.Design &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// Manages the display and persistant data storage for the Blog List control &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;class&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogListDesigner: Telerik.Framework.Web.Design.ControlDesigner &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;#region Fields &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; PropertyDescriptorCollection properties; &lt;/span&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;#endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;#region Properties &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// Gets or sets the template used by BlogListDesigner control. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; ITemplate LayoutTemplate &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;set&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// Gets or sets the path of the template used by BlogListDesigner control. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;virtual&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; LayoutTemplatePath &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ViewState[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"LayoutTemplatePath"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;] == &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"~/Sitefinity/Admin/ControlTemplates/BlogList/BlogListDesigner.ascx"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ViewState[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"LayoutTemplatePath"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;] &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;as&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;set&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ViewState[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"LayoutTemplatePath"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;] = value; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// Gets or sets the BlogList Designer container. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;value&amp;gt;The BlogList designer container.&amp;lt;/value&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogListDesignerContainer Container &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;set&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// Gets or sets the component which is of IBlogList type. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;value&amp;gt;The component which is of IBlogList type.&amp;lt;/value&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; IBlogList Component &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;set&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;#endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;#region Methods &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// Creates the child controls in BlogListDesigner control. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;override&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; CreateChildControls() &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Controls.Clear(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.CreateChildControls(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.InitializeTemplate(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.InitializeComponent(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Controls.Add(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Container); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.SetNumberOfBlogs(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;//this.container.JobsCheckBoxList.SelectedIndexChanged += new EventHandler(JobsCheckBoxList_SelectedIndexChanged); &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Container.Title.TextChanged += &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; EventHandler(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Txt_TextChanged); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Container.NumberOfBlogs.TextChanged += &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; EventHandler(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Txt_TextChanged); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// Initializes the template to use. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;virtual&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; InitializeTemplate() &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Container = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogListDesignerContainer(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.DesignMode) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Page != &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (File.Exists(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Page.MapPath(LayoutTemplatePath))) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.LayoutTemplate= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Page.LoadTemplate(LayoutTemplatePath); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;else&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;throw&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; ArgumentException(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"BlogListDesigner Template Path File not found."&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;else&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Page page = &lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Page(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (File.Exists(HttpContext.Current.Request.MapPath(LayoutTemplatePath))) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.LayoutTemplate = page.LoadTemplate(LayoutTemplatePath); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;else&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;throw&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; ArgumentException(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"BlogListDesigner Template Path File not found."&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.LayoutTemplate.InstantiateIn(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Container); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// Initializes the component which is our public control. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;remarks&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// By "component" we understand the control for which designer is setting properties. By having a &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// reference to the "component" we can access or modify the properties of that control / component. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/remarks&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;virtual&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; InitializeComponent() &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.DesignedControl != &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Component = (IBlogList)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.DesignedControl; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.properties = TypeDescriptor.GetProperties(Component); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// Sets the number of blogs that was selected before &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; SetNumberOfBlogs() &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Container.NumberOfBlogs.Text = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Component.NumberOfBlogs.ToString(); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Component.Title != &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Container.Title.Text = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Component.Title; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;override&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; UpdateProperty(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; ctrl, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; component) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; iD = ((Control)ctrl).ID; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; val = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;val = ((ITextControl)ctrl).Text; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (iD == &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"Title"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Component.Title = val; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;else&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Component.NumberOfBlogs = Convert.ToInt32(val); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;#endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;#region Events &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Txt_TextChanged(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; sender, EventArgs e) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.UpdateProperty(sender, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Component); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.OnPropertyChanged(EventArgs.Empty); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;#endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;#region BlogListDesignerContainer Class &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;class&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogListDesignerContainer : GenericContainer&amp;lt;BlogListDesigner&amp;gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;//Fields &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; TextBox numberOfBlogs; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; TextBox title; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;//Properties &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; TextBox NumberOfBlogs &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.numberOfBlogs == &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.numberOfBlogs = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.FindRequiredControl&amp;lt;TextBox&amp;gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"NumberOfBlogs"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.numberOfBlogs; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; TextBox Title &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.title == &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.title = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.FindRequiredControl&amp;lt;TextBox&amp;gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"Title"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.title; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;// Methods &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogListDesignerContainer(BlogListDesigner owner) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;: &lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;(owner) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;#endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Lets go through each section and see what is going on here.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;First, we notice that our BlogListDesigner class inherits from Telerik.Framework.Web.Design.ControlDesigner. We will override some of the methods from that class.&lt;/p&gt;&lt;p&gt;Much of the code in this class should look familliar to you if you have read through Part 1. We are basically creating a custom control here, so we again have a container, we Call CreateChildControls and do most of our work in there. There are some differences though.&lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-right-color: rgb(127, 157, 185); border-right-width: 1px; border-right-style: solid; border-top-color: rgb(127, 157, 185); border-top-width: 1px; border-top-style: solid; font-size: 11px; overflow-x: auto; overflow-y: auto; border-left-color: rgb(127, 157, 185); border-left-width: 1px; border-left-style: solid; line-height: 100% !important; border-bottom-color: rgb(127, 157, 185); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; background-color: white; "&gt;&lt;table style="border-top-width: 0px; border-left-width: 0px; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-bottom-color: rgb(238, 238, 238); border-bottom-width: 0px; border-bottom-style: solid; border-collapse: collapse; background-color: rgb(255, 255, 255); border-right-width: 0px; " cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom-color: rgb(247, 247, 247); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// Initializes the component which is our public control. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;remarks&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// By "component" we understand the control for which designer is setting properties. By having a &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// reference to the "component" we can access or modify the properties of that control / component. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/remarks&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;virtual&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; InitializeComponent() &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.DesignedControl != &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;) &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{ &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Component = (IBlogList)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.DesignedControl; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.properties = TypeDescriptor.GetProperties(Component); &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;This section is referencing the componenet (the custom control we are setting up the properties for). The base class will then make sure to call the components save and load state methods. This call uses reflection to get a collection of the components public properties.&lt;/p&gt;</description>
      <link>http://sitefinity.habaneros.com/Default/08-09-17/Custom_Control_Example_BlogList_Part2.aspx</link>
      <author>Adam Crandall</author>
      <comments>http://sitefinity.habaneros.com/Default/08-09-17/Custom_Control_Example_BlogList_Part2.aspx</comments>
      <guid isPermaLink="false">d93e2c10-6acc-44be-ad84-8c5ab9d31163</guid>
      <pubDate>Wed, 17 Sep 2008 21:35:00 GMT</pubDate>
    </item>
    <item>
      <title>Custom Control Example:  BlogList (Part 1)</title>
      <description>&lt;p&gt;This control example demonstrates creating a custom, templated control.  We will talk about the custom templated control designer in Part 2 of this example.&lt;/p&gt;&lt;p&gt;The control simply lists out the names of all the Blogs in the current Sitefinity system, and links to their page where there is a page.  The control designer shows up when editing the control on a page asking for the title of the list and the maximum number of blogs to display on the list.&lt;/p&gt;&lt;p&gt;You can download the code in this sample &lt;a href="~/Libraries/Code%20Samples/BlogList.sflb.ashx"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Here is what the BlogList will look like when it runs on the site.  This control was created as a demonstration on how to create a custom control, and not for some needed functionality.&lt;/p&gt;&lt;p&gt;&lt;img src="/Libraries/Screen_Shots/sshot-5.sflb.ashx" alt="BlogList Control" style="width: 236px; height: 95px; " /&gt;&lt;/p&gt;&lt;p&gt;Here is what the custom Control Editor looks like (see part two of this post for details).&lt;/p&gt;&lt;p&gt;&lt;img src="/Libraries/Screen_Shots/BlogList_Designer.sflb.ashx" style="width: 400px; height: 306px; " /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="~/Libraries/Screen_Shots/BlogList_Designer.sflb.ashx?width=300&amp;amp;;height=300&amp;amp;;decreaseOnly=true"&gt;View Larger Image&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline; "&gt;The Code&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;In order to add your own controls to Sitefinity, you can either use standard ASP.NET .ascx User Controls, or you can use what Siteifnity refers to as a Custom Control.  &lt;/p&gt;&lt;p&gt;Custom controls provide more flexibility as you are able to instantiate them in code and can therefore add them to your pages programmatically, among other things.&lt;/p&gt;&lt;p&gt;A custom control consists of a .cs or .vb file for the class, and a Template.  The template is held in a .ascx file, however this is not a user control file as it does not contain the control directive at the beginning of the file.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Here is the control's class code:&lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); overflow-x: auto; overflow-y: auto; font-size: 11px; line-height: 100% !important; font-family: 'courier new'; background-color: white; "&gt;&lt;table cellspacing="0" cellpadding="0" style="border-top-width: 0px; border-right-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-collapse: collapse; background-color: rgb(255, 255, 255); "&gt; &lt;colgroup&gt;&lt;col style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); padding-left: 10px; font-size: 11px; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.Collections;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.ComponentModel;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.IO;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.Linq;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.Web;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.Web.UI;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; System.Web.UI.WebControls;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Telerik.Blogs;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Telerik.Blogs.Data;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Telerik.Cms.Web.UI;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Telerik.Framework.Web.Design;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Telerik.Framework.Web;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;namespace&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; SHC.UI.WebControls  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;{  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    [ToolboxData(&lt;span style="color: rgb(0, 0, 255); "&gt;"&amp;lt;{0}:BlogList runat=\"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;server\&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"&amp;gt;&amp;lt;/{0}:BlogList&amp;gt;"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)]  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    [DefaultProperty(&lt;span style="color: rgb(0, 0, 255); "&gt;"NumberOfBlogs"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)]  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    [ControlDesignerAttribute(&lt;span style="color: rgb(0, 0, 255); "&gt;"SHC.UI.WebControls.Design.BlogListDesigner, SHC.UI.WebControls"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)]  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;class&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogList : CompositeControl, IBlogList  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    { &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;        #region Fields &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;          &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogListContainer blogListCnt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; ITemplate blogListTemplate; &lt;/span&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;         &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;        #endregion         &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        #region Properties  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Title  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;set&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; NumberOfBlogs  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;set&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogListTemplatePath  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; obj = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ViewState[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"BlogListTemplatePath"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;];  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (obj != &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    &lt;span style="color: rgb(0, 0, 255); "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)obj;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;span style="color: rgb(0, 128, 0); "&gt;// otherwise return default path of the Template. This should   &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                &lt;span style="color: rgb(0, 128, 0); "&gt;// be the path of the new template we have created &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"~/Sitefinity/ControlTemplates/BlogList/BlogList.ascx"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;set&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ViewState[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"BlogListTemplatePath"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;] = value;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        } &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;         &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;        #endregion   &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;          &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        #region BlogListContainer Class  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;class&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogListContainer : GenericContainer&amp;lt;BlogList&amp;gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        { &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;            #region Fields &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Repeater blogs;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Literal title; &lt;/span&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;            #endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            #region Properties  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Repeater Blogs  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    &lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogs == &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                        &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogs = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.FindRequiredControl&amp;lt;Repeater&amp;gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"blogsRepeaterList"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    &lt;span style="color: rgb(0, 0, 255); "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogs;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Literal Title  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;get&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    &lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.title == &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                        &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.title = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.FindRequiredControl&amp;lt;Literal&amp;gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"Title"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    &lt;span style="color: rgb(0, 0, 255); "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.title;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            } &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;            #endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            #region Methods  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogListContainer(BlogList owner)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                : &lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;(owner)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            } &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;            #endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        } &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;        #endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;          &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        #region Method Overrides  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;override&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; CreateChildControls()  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Controls.Clear();  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.CreateChildControls();              &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.InitializeTemplate();  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                          &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 128, 0); "&gt;//wire up the repeater ItemDatabound event &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogListCnt.Blogs.ItemDataBound += &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; RepeaterItemEventHandler(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.rptBlogList_ItemDataBound);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                                      &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 128, 0); "&gt;//add the contaiuner to the controls collection of this instance of our custom control &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Controls.Add(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogListCnt);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 128, 0); "&gt;//bind the data &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.BindData();  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;              &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;//override the save/load control state for our custom properties. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;override&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; SaveControlState()  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[] { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Title, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.NumberOfBlogs };  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;override&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; LoadControlState(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; savedState)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (savedState != &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[] objArray = (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[])savedState;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Title = (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)objArray[0];  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.NumberOfBlogs = (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)objArray[1];  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        } &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;        #endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        #region Protected Virtual Methods  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// Initializes the template to use. The principle is very similar to how we do it in all the controls &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;virtual&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; InitializeTemplate()  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogListCnt = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogListContainer(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogListTemplate= ControlUtils.GetTemplate&amp;lt;DefaultBlogListTemplate&amp;gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.BlogListTemplatePath);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogListTemplate.InstantiateIn(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogListCnt);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;virtual&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BindData()  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            BlogManager manager = &lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogManager();  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            IList allBlogs = manager.GetBlogs();  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            blogListCnt.Blogs.DataSource = allBlogs;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.NumberOfBlogs &amp;gt; 0)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;span style="color: rgb(0, 128, 0); "&gt;//use LINQ to get just the right number of blogs for our list &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                var someBlogs = (from Blog b &lt;span style="color: rgb(0, 0, 255); "&gt;in&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; allBlogs select b).Take&amp;lt;Blog&amp;gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.NumberOfBlogs);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                blogListCnt.Blogs.DataSource = someBlogs;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            blogListCnt.Title.Text = &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Title;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogListCnt.Blogs.DataBind();  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        } &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;        #endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;          &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        #region Default Template  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// Default template for the DefaultBlogListTemplate control designer. NOT IMPLEMENTED! &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;class&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; DefaultBlogListTemplate : ITemplate  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 128, 0); "&gt;/// When implemented by a class, defines the object that child controls and templates belong to. These child controls are in turn defined within an inline template. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;param name="container"&amp;gt;The object to contain the instances of controls from the inline template.&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; InstantiateIn(Control container)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;throw&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; NotImplementedException(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"Default control designer not implemented!"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        } &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;        #endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        #region Events  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; rptBlogList_ItemDataBound(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; sender, RepeaterItemEventArgs e)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                IBlog dataItem = (IBlog)e.Item.DataItem;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                HyperLink link = (HyperLink)e.Item.FindControl(&lt;span style="color: rgb(0, 0, 255); "&gt;"blogLink"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (link != &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    link.Text = dataItem.Name;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    link.NavigateUrl = &lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ResolveUrl(dataItem.BlogPage);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        } &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;        #endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;          &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;} &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Here is what our template file looks like (BlogList.aspx)&lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); overflow-x: auto; overflow-y: auto; font-size: 11px; line-height: 100% !important; font-family: 'courier new'; background-color: white; "&gt;&lt;table cellspacing="0" cellpadding="0" style="border-top-width: 0px; border-right-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-collapse: collapse; background-color: rgb(255, 255, 255); "&gt; &lt;colgroup&gt;&lt;col style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); padding-left: 10px; font-size: 11px; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;br &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;/&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0); "&gt;br&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;/&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;h2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;asp:Literal &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;ID&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"Title"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;runat&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"server"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;asp:Literal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;h2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;asp:Repeater &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;ID&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"blogsRepeaterList"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;runat&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"server"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;HeaderTemplate&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0); "&gt;ul&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;HeaderTemplate&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    &lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;ItemTemplate&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;li&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;asp:HyperLink &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;ID&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"blogLink"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); "&gt;runat&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"server"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;asp:HyperLink&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;li&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;    &lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;ItemTemplate&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    &lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;FooterTemplate&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0); "&gt;ul&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;FooterTemplate&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;asp:Repeater&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Let's go through each section and see what is going on.&lt;/p&gt;&lt;p&gt;First thing to note, is that this class inherits from &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.compositecontrol.aspx"&gt;System.Web.UI.WebControls.CompositeControl&lt;/a&gt;, as well as a IBlogList interface.  We will discuss the IBlogList interface later when we talk about the custom designer.  &lt;/p&gt;&lt;p&gt;Inheriting from CompositeControl gives us some built in functionality.  You can read the MSDN entry by following the link above.&lt;/p&gt;&lt;p&gt;We have two private fields&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 13px; color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 13px; "&gt; &lt;/span&gt;&lt;span style="font-size: 13px; color: rgb(43, 145, 175); "&gt;BlogListContainer&lt;/span&gt;&lt;span style="font-size: 13px; "&gt; blogListCnt; &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 13px; "&gt; &lt;/span&gt;&lt;span style="font-size: 13px; color: rgb(43, 145, 175); "&gt;ITemplate&lt;/span&gt;&lt;span style="font-size: 13px; "&gt; blogListTemplate;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;These fields hold the references to our template and our Container.  The template is an instantiation of our .ascx file.  The blogListContainer is a facade to our controls in our template.  It allows us to set the control properties and access them.&lt;/p&gt;&lt;p&gt;Our public properties contain a spot for our Title (the title of the list), and NumberOfBlogs (the max number of blogs to show on the list).  It is important to note that any public properties will automatically be available to edit in the standard (Advanced) control edit screen.  This is the screen you get by click "Edit" on the control while editing a page.  &lt;/p&gt;&lt;span style="font-size: 13px; "&gt;&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;The BlogListTemplate will return the path to the template file we are using.  If we want to use a different template, or another developer does, they can create one, and change the path by setting it in "Edit" screen when they place it on their page.&lt;/p&gt;&lt;p&gt;The BlogListContainer Class inherits from &lt;a href="http://www.sitefinity.com/help/developer-manual/telerik.cms.web.ui-telerik.cms.web.ui.genericcontainer%601.html"&gt;Telerik.Cms.Web.UI.GenericContainer&lt;/a&gt;.  This class contains the fields and properties that represent each control on the template which we need to interact with.  For instance, if you had a drop down list on your template that you wanted to populate with the blogs, instead of a simple list, you would add a private field and public property for that drop down list.  You could then bind the blogs to that list.&lt;/p&gt;&lt;p&gt;You will notice that we do a lazy load of the controls in this template.  In the properties, we check if the control is null (has not been created), if it has, we return it, if not, we create a new instance of the proper control type, and then return it.&lt;/p&gt;&lt;p&gt;The container must contain a constructer taking a single parameter of the Generic type that you are using.  This generic type will be your custom control's type.  In this case it is BlogList.&lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); overflow-x: auto; overflow-y: auto; font-size: 11px; line-height: 100% !important; font-family: 'courier new'; background-color: white; "&gt;&lt;table cellspacing="0" cellpadding="0" style="border-top-width: 0px; border-right-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-collapse: collapse; background-color: rgb(255, 255, 255); "&gt; &lt;colgroup&gt;&lt;col style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); padding-left: 10px; font-size: 11px; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogListContainer(BlogList owner)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                : &lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;(owner)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            } &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Now that we have the ability to reference our controls on our template, we can populate them with data and add them to our control for out.&lt;/p&gt;&lt;p&gt;We have some methods that we are overriding from our CompositControl base class:&lt;/p&gt;&lt;p&gt;CreateChildControls()&lt;/p&gt;&lt;p&gt;LoadControlState()&lt;/p&gt;&lt;p&gt;SaveControlState()&lt;/p&gt;&lt;p&gt;Let's take a look at these in more detail:&lt;/p&gt;&lt;p&gt;&lt;span style="text-decoration: underline; "&gt;CreateChildControls()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;This method does a few things:&lt;/p&gt;&lt;p&gt;1.  It clears the control of any child controls&lt;/p&gt;&lt;p&gt;2.  It initializes and loads our template&lt;/p&gt;&lt;p&gt;3.  It wires up our child control events&lt;/p&gt;&lt;p&gt;4.  It adds the child controls on the template to the current instance of our custom control&lt;/p&gt;&lt;p&gt;5.  It binds the data to the controls on the templates.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; Lets look at steps 2-5.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;2.  Initializing the template is done with the following code:&lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); overflow-x: auto; overflow-y: auto; font-size: 11px; line-height: 100% !important; font-family: 'courier new'; background-color: white; "&gt;&lt;table cellspacing="0" cellpadding="0" style="border-top-width: 0px; border-right-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-collapse: collapse; background-color: rgb(255, 255, 255); "&gt; &lt;colgroup&gt;&lt;col style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); padding-left: 10px; font-size: 11px; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// Initializes the template to use. The principle is very similar to how we do it in all the controls &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;virtual&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; InitializeTemplate()  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogListCnt = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogListContainer(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogListTemplate= ControlUtils.GetTemplate&amp;lt;DefaultBlogListTemplate&amp;gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.BlogListTemplatePath);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogListTemplate.InstantiateIn(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogListCnt);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;This code uses our container to instantiate our template in.  You can see it is using an object of type DefaultBlogListTemplate.  This is an object that implements the &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.itemplate.aspx"&gt;ITemplate&lt;/a&gt; interface.  We have not implemented any of the functionality in this class, but you could add a lot of functionality here, including sub-templates for repeaters, etc.  It is not necessary to use the DefaultTemplate in order to load our templates.  However the alternative method requires a page instance, and we cannot always guarantee that we have one.  We could instantiate one but that is a little heavier than the above implementation I think.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;3.  Wiring up Child Control Events&lt;/p&gt;&lt;p&gt;If we want a control on our template to do something on one of it's events, we need to write an event handler in our custom control and then wire up the event.&lt;/p&gt;&lt;p&gt;In this case, we want to handle the ItemDataBound event of the repeater on our control.  This repeater is in essence our blog list's list.  For this to work we have written the following event handler: &lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); overflow-x: auto; overflow-y: auto; font-size: 11px; line-height: 100% !important; font-family: 'courier new'; background-color: white; "&gt;&lt;table cellspacing="0" cellpadding="0" style="border-top-width: 0px; border-right-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-collapse: collapse; background-color: rgb(255, 255, 255); "&gt; &lt;colgroup&gt;&lt;col style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); padding-left: 10px; font-size: 11px; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;private&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; rptBlogList_ItemDataBound(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; sender, RepeaterItemEventArgs e)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                IBlog dataItem = (IBlog)e.Item.DataItem;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                HyperLink link = (HyperLink)e.Item.FindControl(&lt;span style="color: rgb(0, 0, 255); "&gt;"blogLink"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (link != &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                    link.Text = dataItem.Name;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                    link.NavigateUrl = &lt;span style="color: rgb(0, 0, 255); "&gt;base&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.ResolveUrl(dataItem.BlogPage);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        } &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;And this line actually wires that reapaters ItemDataBound event to our event handler.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;What the above code does is setup the link for each blog found that is bound to the repeater.  This fires when the repeaters DataBind method is called.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;4.  Bind the data to the child controls.&lt;/p&gt;&lt;p&gt;In the case of our custom control, we want to get a list of all blogs, and then list out every blog up to the maximum number of blogs set.&lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); overflow-x: auto; overflow-y: auto; font-size: 11px; line-height: 100% !important; font-family: 'courier new'; background-color: white; "&gt;&lt;table cellspacing="0" cellpadding="0" style="border-top-width: 0px; border-right-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-collapse: collapse; background-color: rgb(255, 255, 255); "&gt; &lt;colgroup&gt;&lt;col style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); padding-left: 10px; font-size: 11px; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;virtual&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BindData()  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            BlogManager manager = &lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; BlogManager();  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            IList allBlogs = manager.GetBlogs();  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            blogListCnt.Blogs.DataSource = allBlogs;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.NumberOfBlogs &amp;gt; 0)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                &lt;span style="color: rgb(0, 128, 0); "&gt;//use LINQ to get just the right number of blogs for our list &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                var someBlogs = (from Blog b &lt;span style="color: rgb(0, 0, 255); "&gt;in&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; allBlogs select b).Take&amp;lt;Blog&amp;gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.NumberOfBlogs);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                blogListCnt.Blogs.DataSource = someBlogs;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            blogListCnt.Title.Text = &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Title;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.blogListCnt.Blogs.DataBind();  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        } &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;  &lt;/p&gt;&lt;p&gt;The BindData() method uses the BlogManager to get the blogs, it then uses a LINQ query to select the number of blogs needed (or all of them if the number is set to 0).  It does this by setting the datasource of the template's repeater control.&lt;/p&gt;&lt;p&gt;This control and any others on the template can be accessed through our container object - blogListCnt.&lt;/p&gt;&lt;p&gt;Once this is done and the title literal control has been set, the DataBind() method on the repeater control is called, this in turn fires our event we wired up above and the list is now DataBound.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline; "&gt;Saving and retreiving our settings&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;So we have almost everything we need to have in order for this control to work.  But you may be asking yourself, how are the Title and the NumberOfBlogs settings saved and retrieved?  And that is an excellent question!&lt;/p&gt;&lt;p&gt;In order for these to be saved and retrieved, we need to override two more functions from our base class, those functions are SaveControlState() and LoadControlState().  When these are called, Sitefinity works some magic and saves these settings to the appropriate places for us.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Here is the code:&lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(127, 157, 185); border-right-color: rgb(127, 157, 185); border-bottom-color: rgb(127, 157, 185); border-left-color: rgb(127, 157, 185); overflow-x: auto; overflow-y: auto; font-size: 11px; line-height: 100% !important; font-family: 'courier new'; background-color: white; "&gt;&lt;table cellspacing="0" cellpadding="0" style="border-top-width: 0px; border-right-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238); margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-collapse: collapse; background-color: rgb(255, 255, 255); "&gt; &lt;colgroup&gt;&lt;col style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(247, 247, 247); padding-left: 10px; font-size: 11px; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;//override the save/load control state for our custom properties. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;override&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; SaveControlState()  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;return&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[] { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Title, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.NumberOfBlogs };  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;protected&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;override&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; LoadControlState(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; savedState)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (savedState != &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;null&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[] objArray = (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;object&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;[])savedState;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.Title = (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)objArray[0];  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                &lt;span style="color: rgb(0, 0, 255); "&gt;this&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;.NumberOfBlogs = (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)objArray[1];  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        } &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;These methods are quite straight forward.&lt;/p&gt;&lt;p&gt;SaveControlState simply returns an object, in our case an array containing our settings.&lt;/p&gt;&lt;p&gt;LoadConrolState takes one parameter, an object.  This parameter will always be the object we created in SaveControlState or a null object.  So we can then pull the settings out of our array, and set the properties on our control.  &lt;/p&gt;&lt;p&gt;These two functions are called when you edit the control while in the page edit mode.&lt;/p&gt;&lt;p&gt;So, now we have a working control, that we can set two settings on, that loads some data and consumes our template.  Our template is independent of our implementation and can be altered as long as it contains the literal and repeater controls we are looking for.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;We will cover the custom control designer in an later post, Custom Control Example:  BlogList (Part 2).  Until then, here are some links to Sitefinity's documentation that deal with these concepts:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.sitefinity.com/help/developer-manual/adding-new-custom-controls-anatomy-of-a-custom-control.html"&gt;Anatomy of a Custom Control&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.sitefinity.com/help/developer-manual/adding-new-custom-controls-implementing-control-designers-on-custom-control.html"&gt;Implementing Control Designers on Custom Controls&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;</description>
      <link>http://sitefinity.habaneros.com/Default/08-07-09/Custom_Control_Example_BlogList_Part_1.aspx</link>
      <author>Adam Crandall</author>
      <comments>http://sitefinity.habaneros.com/Default/08-07-09/Custom_Control_Example_BlogList_Part_1.aspx</comments>
      <guid isPermaLink="false">90ffdbd9-dca4-40aa-a8dc-ea171c25ed47</guid>
      <pubDate>Wed, 09 Jul 2008 17:00:44 GMT</pubDate>
    </item>
    <item>
      <title>Setting page permissions using API</title>
      <description>&lt;p&gt;If you are creating pages in Sitefinity using the API you may also want to set permissions on who can perform actions on this page at the same time.&lt;/p&gt;&lt;p&gt;Here is an example of how to do this:&lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-right-color: rgb(127, 157, 185); border-right-width: 1px; border-right-style: solid; border-top-color: rgb(127, 157, 185); border-top-width: 1px; border-top-style: solid; font-size: 11px; overflow-x: auto; overflow-y: auto; border-left-color: rgb(127, 157, 185); border-left-width: 1px; border-left-style: solid; line-height: 100% !important; border-bottom-color: rgb(127, 157, 185); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; background-color: white; "&gt;&lt;table style="border-top-width: 0px; border-left-width: 0px; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-bottom-color: rgb(238, 238, 238); border-bottom-width: 0px; border-bottom-style: solid; border-collapse: collapse; background-color: rgb(255, 255, 255); border-right-width: 0px; " cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom-color: rgb(247, 247, 247); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;// Create a role &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;span style="color: rgb(0, 0, 255); "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; role = name + &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;" administrators"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                SecurityService.CreateRole(role);  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;span style="color: rgb(0, 128, 0); "&gt;// Set permissions &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                storePage.InheritsPermissions = &lt;span style="color: rgb(0, 0, 255); "&gt;false&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;;  &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;// breaks permission inheritance &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; grant = (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)SecurityService.Permissions.View +  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                            (&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)SecurityService.Permissions.Modify +  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                            (&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)SecurityService.Permissions.Approve +  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                            (&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)SecurityService.Permissions.Publish;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; deny = (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)SecurityService.Permissions.Create +  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                           (&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)SecurityService.Permissions.DeleteRollback +  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                           (&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)SecurityService.Permissions.ChangePermissions +  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                           (&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)SecurityService.Permissions.ChangeProperties +  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                           (&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)SecurityService.Permissions.ModifyLayout;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;                storePage.SetPermissions(grant, deny, role); &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;There is a support method and Enum for the above code as shown in the following Class:&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-right-color: rgb(127, 157, 185); border-right-width: 1px; border-right-style: solid; border-top-color: rgb(127, 157, 185); border-top-width: 1px; border-top-style: solid; font-size: 11px; overflow-x: auto; overflow-y: auto; border-left-color: rgb(127, 157, 185); border-left-width: 1px; border-left-style: solid; line-height: 100% !important; border-bottom-color: rgb(127, 157, 185); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; background-color: white; "&gt;&lt;table style="border-top-width: 0px; border-left-width: 0px; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-bottom-color: rgb(238, 238, 238); border-bottom-width: 0px; border-bottom-style: solid; border-collapse: collapse; background-color: rgb(255, 255, 255); border-right-width: 0px; " cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom-color: rgb(247, 247, 247); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;span style="color: rgb(0, 128, 0); "&gt;/// Provides secuirty functionality. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;span style="color: rgb(0, 0, 255); "&gt;class&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; SecurityService  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;span style="color: rgb(0, 128, 0); "&gt;/// Represents Sitefinity permissions &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;enum&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; Permissions  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            View = 1,  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            Create = 2,  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            Modify = 4,  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            DeleteRollback = 8,  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            ChangePermissions = 16,  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            ChangeProperties = 32,  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            Approve = 64,  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            Publish = 128,  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            ModifyLayout = 256  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        } &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;        #region Methods &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;span style="color: rgb(0, 128, 0); "&gt;/// Creates a new role if the later does not already exists, otherwise do nothing. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;param name="roleName"&amp;gt;The role name.&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;static&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; CreateRole(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;string&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; roleName)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;span style="color: rgb(0, 0, 255); "&gt;if&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; (!Roles.RoleExists(roleName))  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;                Roles.CreateRole(roleName);  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            }  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        } &lt;span style="color: rgb(128, 128, 128); "&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;&lt;span style="color: rgb(128, 128, 128); "&gt;        #endregion &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;    } &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; As you can see in the above sample, we are also creating a new role to use for this page. Once that is done, we are breaking the inheritance of permissions from the parent page.&lt;/p&gt;&lt;p&gt;The next calls create the permissions for the role for both grant and deny on this page.&lt;/p&gt;</description>
      <link>http://sitefinity.habaneros.com/Default/08-07-07/Setting_page_permissions_using_API.aspx</link>
      <author>Adam Crandall</author>
      <comments>http://sitefinity.habaneros.com/Default/08-07-07/Setting_page_permissions_using_API.aspx</comments>
      <guid isPermaLink="false">c08b3333-0f2f-4500-86ed-7b16ac048dfe</guid>
      <pubDate>Mon, 07 Jul 2008 11:04:16 GMT</pubDate>
    </item>
    <item>
      <title>Creating Localized Versions of Pages - Programatically</title>
      <description>&lt;p&gt;In a previous post, we talked about creating a localized version of a page, and copying all the controls from that other version to the new version using the Sitefinity Admin UI.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Here is an example on how to accomplish a simmilar task.  This will not copy all of the controls,but it will create the page for you.&lt;/p&gt;&lt;div class="sfug-CodeBlock"&gt;&lt;div style="border-right-color: rgb(127, 157, 185); border-right-width: 1px; border-right-style: solid; border-top-color: rgb(127, 157, 185); border-top-width: 1px; border-top-style: solid; font-size: 11px; overflow-x: auto; overflow-y: auto; border-left-color: rgb(127, 157, 185); border-left-width: 1px; border-left-style: solid; line-height: 100% !important; border-bottom-color: rgb(127, 157, 185); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; background-color: white; "&gt;&lt;table style="border-top-width: 0px; border-left-width: 0px; margin-top: 2px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px; width: 99%; border-bottom-color: rgb(238, 238, 238); border-bottom-width: 0px; border-bottom-style: solid; border-collapse: collapse; background-color: rgb(255, 255, 255); border-right-width: 0px; " cellspacing="0" cellpadding="0"&gt; &lt;colgroup&gt;&lt;col style="padding-left: 10px; font-size: 11px; border-bottom-color: rgb(247, 247, 247); border-bottom-width: 1px; border-bottom-style: solid; font-family: 'courier new'; white-space: nowrap; " /&gt;&lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size: 11px; "&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// Copies a page from one language to another. The destination language is determined by  &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// the caller's current UI culture. &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;param name="pageID"&amp;gt;The page to copy from.&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;param name="languageID"&amp;gt;The page's language to copy from.&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        &lt;span style="color: rgb(0, 128, 0); "&gt;/// &amp;lt;param name="id"&amp;gt;The store ID.&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;        &lt;span style="color: rgb(0, 0, 255); "&gt;public&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;void&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; CopyStorePageInAnotherLanguage(Guid pageID, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;int&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; languageID&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;)  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        {  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;           &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            CmsManager cmsManager = &lt;span style="color: rgb(0, 0, 255); "&gt;new&lt;/span&gt;&lt;span style="font-size: 11px; "&gt; CmsManager();  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            ICmsPage cmsPage = (ICmsPage)cmsManager.GetPage(pageID, &lt;span style="color: rgb(0, 0, 255); "&gt;true&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            cmsPage.Staged.CopyFromLanguage(languageID);  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            cmsPage.Navigable = &lt;span style="color: rgb(0, 0, 255); "&gt;true&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;;  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            cmsPage.MenuName = "New Page"&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            &lt;span style="color: rgb(0, 128, 0); "&gt;// Set the new page's template and theme &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            cmsPage.Staged.SetTemplate(cmsManager.GetTemplate(&lt;span style="color: rgb(0, 0, 255); "&gt;"Store"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;).ID, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;"Boston Pizza"&lt;/span&gt;&lt;span style="font-size: 11px; "&gt;);  &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            &lt;span style="color: rgb(0, 128, 0); "&gt;// Check in and publish &lt;/span&gt;&lt;span style="font-size: 11px; "&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;            cmsPage.Staged.CheckIn();  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="background-color: rgb(247, 247, 247); "&gt;            cmsPage.Publish();  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;        } &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;It is important to note that the page will be copied to the current UI culture.  So you may need to set this culture using Page.UICulture = CultureId if you are copying to a culture other than the user's default culture as set in their browser.&lt;/p&gt;</description>
      <link>http://sitefinity.habaneros.com/Default/08-07-07/Creating_Localized_Versions_of_Pages_-_Programatically.aspx</link>
      <author>Adam Crandall</author>
      <comments>http://sitefinity.habaneros.com/Default/08-07-07/Creating_Localized_Versions_of_Pages_-_Programatically.aspx</comments>
      <guid isPermaLink="false">9d3bc578-b584-4035-85c0-a709878c54ec</guid>
      <pubDate>Mon, 07 Jul 2008 10:31:21 GMT</pubDate>
    </item>
  </channel>
</rss>
