/// <summary> /// Create a new divider. /// </summary> public static FluentTagBuilder Div(this FluentTagBuilder @this, string classAttr = null, string content = null) { return(@this.Append(new FluentTagBuilder() .StartTag("div").ActionIf(!string.IsNullOrEmpty(classAttr), tag => tag.Class(classAttr)) .Append(content) .EndTag())); }
/// <summary> /// Create a new anchor. /// </summary> public static FluentTagBuilder Anchor(this FluentTagBuilder @this, string href, string content, object htmlAttributes = null) { return(@this.Append(new FluentTagBuilder() .StartTag("a") .Attribute("href", href) .Attributes(htmlAttributes) .Append(content) .EndTag())); }
/// <summary> /// Create a new ajax anchor. /// </summary> public static FluentTagBuilder AjaxAnchor(this FluentTagBuilder @this, string href, string mode, string updateId, string content = null, object htmlAttributes = null) { return(@this.Append(new FluentTagBuilder() .StartTag("a") .Attribute("href", href) .Attribute("data-ajax", "true") .Attribute("data-ajax-mode", mode) .Attribute("data-ajax-update", $"#{updateId}") .Attributes(htmlAttributes) .Append(content) .EndTag())); }