예제 #1
0
        protected Dictionary <string, object> GetAttributesDictionary()
        {
            object attrClass;

            if (HtmlAttributes.TryGetValue("class", out attrClass))
            {
                string strClass = (string)attrClass;
                var    classes  = strClass.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                if (classes.Length > 0)
                {
                    CssClasses.AddRange(classes);
                }

                HtmlAttributes.Remove("class");
            }

            var result = new Dictionary <string, object>(HtmlAttributes);

            result["class"] = GetCssClassString();

            return(result);
        }