Beispiel #1
0
        private void LoadDropdown()
        {
            string path = PortalSettings.HomeDirectoryMapPath + "Xsl";

            DotNetNuke.NewsProvider.Utils.BindTemplateByName(ddlTemplate, path, "comment_list*.xsl");

            NewsController             newsCont = new NewsController();
            Dictionary <int, NewsInfo> dicNews  = newsCont.GetNewsByPortal(PortalId);
            ArrayList fLstNews = new ArrayList();
            NewsInfo  info     = new NewsInfo();

            info.ID       = 0;
            info.Headline = "";
            fLstNews.Add(info);
            foreach (NewsInfo fNewsInfo in dicNews.Values)
            {
                fLstNews.Add(fNewsInfo);
            }
            ddlNews.DataSource     = fLstNews;
            ddlNews.DataTextField  = "Headline";
            ddlNews.DataValueField = "ID";
            ddlNews.DataBind();
        }