Exemplo n.º 1
0
        public static TagA AbsoluteHref(this TagA tag)
        {
            var href = tag.Attribute("href").GetOrDefault(x => x.Value);

            tag.SetAttributeValue("href", CommonConst.SiteRoot + href);
            return(tag);
        }
Exemplo n.º 2
0
        public static string GetHref(this TagA tag)
        {
            var attr = tag.Attribute("href");

            if (attr == null)
            {
                return(string.Empty);
            }
            return(attr.Value);
        }