public static string RenderTabs(this HtmlHelper htmlHelper, string[] tabsIds, TabsTypes tabsType) { switch (tabsType) { case TabsTypes.Recommendation: return RenderTabs(htmlHelper, tabsIds, new { }); case TabsTypes.DefaultFuntionality: return RenderTabs(htmlHelper, tabsIds, new { }); default: // Recommendation return RenderTabs(htmlHelper, tabsIds, new { }); } }
public static string Tabs(this HtmlHelper htmlHelper, string id, string[] title, string[] content, TabsTypes tabsType, object htmlAttributes, bool withoutScript) { // Create tag builder var builder = new TagBuilder("div"); // Create valid id builder.GenerateId(id); // Add attributes builder.MergeAttributes(new RouteValueDictionary(htmlAttributes)); // title builder.InnerHtml += "<ul>"; int i = 1; foreach (var t in title) { builder.InnerHtml += string.Format("<li><a href=\"#{0}_tabs-{1}\">{2}</a></li>", id, i++, t); } builder.InnerHtml += "</ul>"; // content i = 1; foreach (var c in content) { builder.InnerHtml += string.Format("<div id=\"#{0}_tabs-{1}\">{2}</div>", id, i++, c); } // Render tag return(builder.ToString(TagRenderMode.Normal) + (withoutScript == true ? string.Empty : "\n " + RenderTabs(htmlHelper, new string[] { id }, tabsType))); }
public static string Tabs(this HtmlHelper htmlHelper, string id, string[] title, string[] content, TabsTypes tabsType, object htmlAttributes) { return(Tabs(htmlHelper, id, title, content, tabsType, htmlAttributes, false /*withoutScript*/)); }
public static string Tabs(this HtmlHelper htmlHelper, string id, string[] title, string[] content, TabsTypes tabsType, bool withoutScript) { return(Tabs(htmlHelper, id, title, content, tabsType, null /*htmlAttributes*/, withoutScript)); }
public static string RenderTabs(this HtmlHelper htmlHelper, string[] tabsIds, TabsTypes tabsType) { switch (tabsType) { case TabsTypes.Recommendation: return(RenderTabs(htmlHelper, tabsIds, new { })); case TabsTypes.DefaultFuntionality: return(RenderTabs(htmlHelper, tabsIds, new { })); default: // Recommendation return(RenderTabs(htmlHelper, tabsIds, new { })); } }
public static string Tabs(this HtmlHelper htmlHelper, string id, string[] title, string[] content, TabsTypes tabsType, object htmlAttributes, bool withoutScript) { // Create tag builder var builder = new TagBuilder("div"); // Create valid id builder.GenerateId(id); // Add attributes builder.MergeAttributes(new RouteValueDictionary(htmlAttributes)); // title builder.InnerHtml += "<ul>"; int i = 1; foreach (var t in title) { builder.InnerHtml += string.Format("<li><a href=\"#{0}_tabs-{1}\">{2}</a></li>",id, i++, t); } builder.InnerHtml += "</ul>"; // content i = 1; foreach (var c in content) { builder.InnerHtml += string.Format("<div id=\"#{0}_tabs-{1}\">{2}</div>",id, i++, c); } // Render tag return builder.ToString(TagRenderMode.Normal) + (withoutScript == true ? string.Empty : "\n " + RenderTabs(htmlHelper, new string[] { id }, tabsType)); }
public static string Tabs(this HtmlHelper htmlHelper, string id, string[] title, string[] content, TabsTypes tabsType, object htmlAttributes) { return Tabs(htmlHelper, id, title, content, tabsType, htmlAttributes, false/*withoutScript*/); }
public static string Tabs(this HtmlHelper htmlHelper, string id, string[] title, string[] content, TabsTypes tabsType, bool withoutScript) { return Tabs(htmlHelper, id, title, content, tabsType, null/*htmlAttributes*/, withoutScript); }