Ejemplo n.º 1
0
        private void SetCSS()
        {
            if (!String.IsNullOrEmpty(CssClassNormal) || !String.IsNullOrEmpty(CSSSelected))
            {
                string sCSS    = "";
                string sSelCss = "";

                if (IsSelected)
                {
                    sSelCss = CSSSelected.Trim();
                }

                sCSS = String.Format("{0} {1}", CssClassNormal.Trim(), sSelCss);

                lnk.CssClass = sCSS.Trim();
            }
        }
Ejemplo n.º 2
0
        private void SetTag()
        {
            litOpen.Text  = HtmlTextWriter.TagLeftChar + HtmlTagName + HtmlTextWriter.TagRightChar;
            litClose.Text = HtmlTextWriter.EndTagLeftChars + HtmlTagName + HtmlTextWriter.TagRightChar;

            if (!String.IsNullOrEmpty(CssClassNormal) || !String.IsNullOrEmpty(CSSSelected))
            {
                string sCSS    = "";
                string sSelCss = "";

                if (IsSelected)
                {
                    sSelCss = CSSSelected.Trim();
                }

                if (!String.IsNullOrEmpty(CssClassNormal) || !String.IsNullOrEmpty(sSelCss))
                {
                    sCSS = String.Format(" class=\"{0} {1}\"", CssClassNormal.Trim(), sSelCss);
                }

                litOpen.Text = HtmlTextWriter.TagLeftChar + HtmlTagName + sCSS + HtmlTextWriter.TagRightChar;
            }
        }