예제 #1
0
 public string CloseHtmlTag(HtmlTags tag)
 {
     return($"</{tag.ToString()}>");
 }
예제 #2
0
 public string GetHtmlTag(HtmlTags tag, object value, string cssClass, string style, string otherAttributes = "")
 {
     return($"<{tag.ToString()} {GetClassNameAttribute(cssClass)} {GetStyleAttribute(style)} {otherAttributes}>{value}</{tag.ToString()}>");
 }
예제 #3
0
 public string OpenHtmlTag(HtmlTags tag, string cssClass, string style)
 {
     return($"<{tag.ToString()} {GetClassNameAttribute(cssClass)} {GetStyleAttribute(style)}>");
 }
예제 #4
0
        public static string GetHtmlTagName(HtmlTags tag)
        {
            switch (tag)
            {
            case HtmlTags.col:
                return("col");

            case HtmlTags.colgroup:
                return("colgroup");

            case HtmlTags.div:
                return("div");

            case HtmlTags.h1:
                return("h1");

            case HtmlTags.h2:
                return("h2");

            case HtmlTags.h3:
                return("h3");

            case HtmlTags.h4:
                return("h4");

            case HtmlTags.h5:
                return("h5");

            case HtmlTags.h6:
                return("h6");

            case HtmlTags.ul:
                return("ul");

            case HtmlTags.ol:
                return("ol");

            case HtmlTags.li:
                return("li");

            case HtmlTags.p:
                return("p");

            case HtmlTags.imagemap:
                return("imagemap");

            case HtmlTags.image:
                return("img");

            case HtmlTags.span:
                return("span");

            case HtmlTags.table:
                return("table");

            case HtmlTags.tableDataCell:
                return("td");

            case HtmlTags.tableHeaderCell:
                return("th");

            case HtmlTags.tableRow:
                return("tr");

            default:
                throw new XhtmlException("GetHtmlTagName: unknown html- Tag: " + tag.ToString());
            }
        }