Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. using EPiServer;
  8. using EPiServer.Core;
  9.  
  10. namespace NetR.Project.Templates.Units
  11. {
  12.     public partial class TeaserList : SiteUserControlBase
  13.     {
  14.         protected void Page_Load(object sender, EventArgs e)
  15.         {
  16.              PropertyData pd = CurrentPage.Property["TeaserContainer"];
  17.  
  18.             if (pd != null && !pd.IsNull)
  19.             {
  20.                 PageReference pageReference = pd.Value as PageReference;
  21.  
  22.                 if (!PageReference.IsNullOrEmpty(pageReference))
  23.                 {
  24.                     var teasers = GetChildren(pageReference);
  25.  
  26.                      plTeaserList.DataSource = teasers;
  27.                      plTeaserList.DataBind();
  28.                 }
  29.             }
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement