Ejemplo n.º 1
0
        protected internal EmailButtonItem CloneEmailButtonItem()
        {
            EmailButtonItem newEmailButtonItem = this.CreateEmailButtonItem();

            this.CopyProperties(newEmailButtonItem);
            return(newEmailButtonItem);
        }
Ejemplo n.º 2
0
        private void RenderEmailButtonItem(HtmlTextWriter writer, EmailButtonItem button)
        {
            string btnAlt = string.Empty;

            if (!string.IsNullOrEmpty(button.Title.Trim()))
            {
                writer.AddAttribute(HtmlTextWriterAttribute.Title, button.Title);
                btnAlt = button.Title;
            }
            writer.AddAttribute(HtmlTextWriterAttribute.Href, pgInstruction.GetUrl("email").ToString());
            string emailOnClick = string.Empty;

            if (!string.IsNullOrEmpty(button.WebAnalytics.Trim()))
            {
                emailOnClick += button.WebAnalytics;
            }
            emailOnClick += " " + "dynPopWindow('" + pgInstruction.GetUrl("email").ToString().Replace("'", "%27").Replace("(", "%28").Replace(")", "%29") + "', 'emailPopUp', 'height=525,width=492'); return false;";
            writer.AddAttribute(HtmlTextWriterAttribute.Onclick, emailOnClick);
            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
        }
Ejemplo n.º 3
0
 protected void CopyProperties(EmailButtonItem newEmailButtonItem)
 {
     ((EmailButtonItem)newEmailButtonItem).Title = this.Title;
 }