示例#1
0
        protected override void Render(HtmlTextWriter writer)
        {
            XmlNode node = CommentBrowser.GetArticleSubjectDocument().SelectSingleNode("root/Subject[SubjectId='" + this.SubjectId + "']");

            if (node != null)
            {
                base.Text = node.SelectSingleNode("SubjectName").InnerText;
            }
            base.Render(writer);
        }
示例#2
0
 protected override void OnLoad(EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         XmlNode node      = CommentBrowser.GetArticleSubjectDocument().SelectSingleNode("root/Subject[SubjectId='" + this.SubjectId + "']");
         int?    maxNum    = null;
         string  innerText = string.Empty;
         string  keyWords  = string.Empty;
         if (node != null)
         {
             innerText = node.SelectSingleNode("Categories").InnerText;
             if (!string.IsNullOrEmpty(innerText))
             {
                 innerText = "(" + innerText + ")";
             }
             maxNum   = new int?(int.Parse(node.SelectSingleNode("MaxNum").InnerText));
             keyWords = node.SelectSingleNode("Keywords").InnerText;
         }
         base.DataSource = CommentBrowser.GetArticleList(maxNum, innerText, keyWords);
         base.DataBind();
     }
 }