Пример #1
0
        protected internal LinkButtonItem CloneLinkButtonItem()
        {
            LinkButtonItem newLinkButtonItem = this.CreateLinkButtonItem();

            this.CopyProperties(newLinkButtonItem);
            return(newLinkButtonItem);
        }
Пример #2
0
        private void RenderLinkButtonItem(HtmlTextWriter writer, LinkButtonItem button)
        {
            string btnAlt = string.Empty;

            if (!string.IsNullOrEmpty(button.Title.Trim()))
            {
                writer.AddAttribute(HtmlTextWriterAttribute.Title, button.Title);
                btnAlt = button.Title;
            }
            if (!string.IsNullOrEmpty(button.WebAnalytics.Trim()))
            {
                writer.AddAttribute(HtmlTextWriterAttribute.Onclick, button.WebAnalytics);
            }
            writer.AddAttribute(HtmlTextWriterAttribute.Href, pgInstruction.GetUrl(button.AlternateContentVersionKey).ToString());
            writer.RenderBeginTag(HtmlTextWriterTag.A);
            writer.AddAttribute(HtmlTextWriterAttribute.Alt, btnAlt);
            writer.AddAttribute(HtmlTextWriterAttribute.Src, "/publishedcontent/images/images/spacer.gif");
            writer.RenderBeginTag(HtmlTextWriterTag.Img);
            writer.RenderEndTag(); // img
            writer.RenderEndTag(); // a
        }
Пример #3
0
 protected void CopyProperties(LinkButtonItem newLinkButtonItem)
 {
     ((LinkButtonItem)newLinkButtonItem).Title = this.Title;
 }