HtmlExtensions
Assembly: ServiceStack.Razor.dll
View Source
public static class HtmlExtensions
Methods
AsRawJson<T>(T)
View Source
public static MvcHtmlString AsRawJson<T>(this T model)
Returns
ServiceStack.Html.MvcHtmlString
Parameters
Type | Name |
---|---|
<T> | model |
Type Parameters
T
AsRaw<T>(T)
View Source
public static MvcHtmlString AsRaw<T>(this T model)
Returns
ServiceStack.Html.MvcHtmlString
Parameters
Type | Name |
---|---|
<T> | model |
Type Parameters
T
GetRequest(HtmlHelper)
View Source
public static IRequest GetRequest(this HtmlHelper html)
Returns
IRequest
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
ToHtmlString(String)
View Source
public static HtmlString ToHtmlString(this string str)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
System.String | str |
GetItem(HtmlHelper, String)
View Source
public static object GetItem(this HtmlHelper html, string key)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | key |
GetErrorStatus(HtmlHelper)
View Source
public static ResponseStatus GetErrorStatus(this HtmlHelper html)
Returns
ResponseStatus
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
HasErrorStatus(HtmlHelper)
View Source
public static bool HasErrorStatus(this HtmlHelper html)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
Form(HtmlHelper, String)
View Source
public static string Form(this HtmlHelper html, string name)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
Query(HtmlHelper, String)
View Source
public static string Query(this HtmlHelper html, string name)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
FormQuery(HtmlHelper, String)
View Source
public static string FormQuery(this HtmlHelper html, string name)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
FormQueryValues(HtmlHelper, String)
View Source
public static string[] FormQueryValues(this HtmlHelper html, string name)
Returns
System.String[]
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
FormValue(HtmlHelper, String)
View Source
public static string FormValue(this HtmlHelper html, string name)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
FormValue(HtmlHelper, String, String)
View Source
public static string FormValue(this HtmlHelper html, string name, string defaultValue)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
System.String | defaultValue |
FormValues(HtmlHelper, String)
View Source
public static string[] FormValues(this HtmlHelper html, string name)
Returns
System.String[]
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
FormCheckValue(HtmlHelper, String)
View Source
public static bool FormCheckValue(this HtmlHelper html, string name)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
GetParam(HtmlHelper, String)
View Source
public static string GetParam(this HtmlHelper html, string name)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
ErrorResponseExcept(HtmlHelper, String)
View Source
public static string ErrorResponseExcept(this HtmlHelper html, string fieldNames)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | fieldNames |
ErrorResponseExcept(HtmlHelper, ICollection<String>)
View Source
public static string ErrorResponseExcept(this HtmlHelper html, ICollection<string> fieldNames)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.ICollection<System.String> | fieldNames |
ErrorResponseSummary(HtmlHelper)
View Source
public static string ErrorResponseSummary(this HtmlHelper html)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
ErrorResponse(HtmlHelper, String)
View Source
public static string ErrorResponse(this HtmlHelper html, string fieldName)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | fieldName |
UserProfileUrl(HtmlHelper)
View Source
public static string UserProfileUrl(this HtmlHelper html)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
ErrorSummary(HtmlHelper, String)
Alias for ServiceStack Html.ValidationSummary() with comma-delimited field names
View Source
public static HtmlString ErrorSummary(this HtmlHelper html, string exceptFor)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | exceptFor |
ErrorSummary(HtmlHelper)
View Source
public static HtmlString ErrorSummary(this HtmlHelper html)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
ValidationSummary(HtmlHelper, ICollection<String>)
View Source
public static HtmlString ValidationSummary(this HtmlHelper html, ICollection<string> exceptFields)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.ICollection<System.String> | exceptFields |
ValidationSummary(HtmlHelper, ICollection<String>, Dictionary<String, Object>)
View Source
public static HtmlString ValidationSummary(this HtmlHelper html, ICollection<string> exceptFields, Dictionary<string, object> divAttrs)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.ICollection<System.String> | exceptFields |
System.Collections.Generic.Dictionary<System.String,System.Object> | divAttrs |
ValidationSummary(HtmlHelper, ICollection<String>, Object)
View Source
public static HtmlString ValidationSummary(this HtmlHelper html, ICollection<string> exceptFields, object divAttrs)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.ICollection<System.String> | exceptFields |
System.Object | divAttrs |
HiddenInputs(HtmlHelper, IEnumerable<KeyValuePair<String, String>>)
View Source
public static HtmlString HiddenInputs(this HtmlHelper html, IEnumerable<KeyValuePair<string, string>> kvps)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,System.String>> | kvps |
HiddenInputs(HtmlHelper, IEnumerable<KeyValuePair<String, Object>>)
View Source
public static HtmlString HiddenInputs(this HtmlHelper html, IEnumerable<KeyValuePair<string, object>> kvps)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,System.Object>> | kvps |
HiddenInputs(HtmlHelper, Object)
View Source
public static HtmlString HiddenInputs(this HtmlHelper html, object kvps)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Object | kvps |
FormTextarea(HtmlHelper, Object)
View Source
public static HtmlString FormTextarea(this HtmlHelper html, object inputAttrs)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Object | inputAttrs |
FormTextarea(HtmlHelper, Dictionary<String, Object>)
View Source
public static HtmlString FormTextarea(this HtmlHelper html, Dictionary<string, object> inputAttrs)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.Dictionary<System.String,System.Object> | inputAttrs |
FormTextarea(HtmlHelper, Object, InputOptions)
View Source
public static HtmlString FormTextarea(this HtmlHelper html, object inputAttrs, InputOptions inputOptions)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Object | inputAttrs |
ServiceStack.InputOptions | inputOptions |
FormTextarea(HtmlHelper, Dictionary<String, Object>, InputOptions)
View Source
public static HtmlString FormTextarea(this HtmlHelper html, Dictionary<string, object> inputAttrs, InputOptions inputOptions)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.Dictionary<System.String,System.Object> | inputAttrs |
ServiceStack.InputOptions | inputOptions |
FormSelect(HtmlHelper, Object)
View Source
public static HtmlString FormSelect(this HtmlHelper html, object inputAttrs)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Object | inputAttrs |
FormSelect(HtmlHelper, Dictionary<String, Object>)
View Source
public static HtmlString FormSelect(this HtmlHelper html, Dictionary<string, object> inputAttrs)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.Dictionary<System.String,System.Object> | inputAttrs |
FormSelect(HtmlHelper, Object, InputOptions)
View Source
public static HtmlString FormSelect(this HtmlHelper html, object inputAttrs, InputOptions inputOptions)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Object | inputAttrs |
ServiceStack.InputOptions | inputOptions |
FormSelect(HtmlHelper, Dictionary<String, Object>, InputOptions)
View Source
public static HtmlString FormSelect(this HtmlHelper html, Dictionary<string, object> inputAttrs, InputOptions inputOptions)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.Dictionary<System.String,System.Object> | inputAttrs |
ServiceStack.InputOptions | inputOptions |
FormInput(HtmlHelper, Object)
View Source
public static HtmlString FormInput(this HtmlHelper html, object inputAttrs)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Object | inputAttrs |
FormInput(HtmlHelper, Dictionary<String, Object>)
View Source
public static HtmlString FormInput(this HtmlHelper html, Dictionary<string, object> inputAttrs)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.Dictionary<System.String,System.Object> | inputAttrs |
FormInput(HtmlHelper, Object, InputOptions)
View Source
public static HtmlString FormInput(this HtmlHelper html, object inputAttrs, InputOptions inputOptions)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Object | inputAttrs |
ServiceStack.InputOptions | inputOptions |
FormInput(HtmlHelper, Dictionary<String, Object>, InputOptions)
View Source
public static HtmlString FormInput(this HtmlHelper html, Dictionary<string, object> inputAttrs, InputOptions inputOptions)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.Dictionary<System.String,System.Object> | inputAttrs |
ServiceStack.InputOptions | inputOptions |
FormControl(HtmlHelper, Object, String, InputOptions)
View Source
public static HtmlString FormControl(this HtmlHelper html, object inputAttrs, string tagName, InputOptions inputOptions)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Object | inputAttrs |
System.String | tagName |
ServiceStack.InputOptions | inputOptions |
FormControl(HtmlHelper, Dictionary<String, Object>, String, InputOptions)
View Source
public static HtmlString FormControl(this HtmlHelper html, Dictionary<string, object> inputAttrs, string tagName, InputOptions inputOptions)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.Dictionary<System.String,System.Object> | inputAttrs |
System.String | tagName |
ServiceStack.InputOptions | inputOptions |
BundleJs(HtmlHelper, BundleOptions)
View Source
public static HtmlString BundleJs(this HtmlHelper html, BundleOptions options)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
ServiceStack.BundleOptions | options |
BundleCss(HtmlHelper, BundleOptions)
View Source
public static HtmlString BundleCss(this HtmlHelper html, BundleOptions options)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
ServiceStack.BundleOptions | options |
BundleHtml(HtmlHelper, BundleOptions)
View Source
public static HtmlString BundleHtml(this HtmlHelper html, BundleOptions options)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
ServiceStack.BundleOptions | options |
TextDump(HtmlHelper, Object)
View Source
public static string TextDump(this HtmlHelper html, object target)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Object | target |
TextDump(HtmlHelper, Object, TextDumpOptions)
View Source
public static string TextDump(this HtmlHelper html, object target, TextDumpOptions options)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Object | target |
ServiceStack.TextDumpOptions | options |
HtmlDump(HtmlHelper, Object)
View Source
public static HtmlString HtmlDump(this HtmlHelper html, object target)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Object | target |
HtmlDump(HtmlHelper, Object, HtmlDumpOptions)
View Source
public static HtmlString HtmlDump(this HtmlHelper html, object target, HtmlDumpOptions options)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Object | target |
ServiceStack.HtmlDumpOptions | options |
GetNavItems(HtmlHelper)
View Source
public static List<NavItem> GetNavItems(this HtmlHelper html)
Returns
System.Collections.Generic.List<NavItem>
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
GetNavItems(HtmlHelper, String)
View Source
public static List<NavItem> GetNavItems(this HtmlHelper html, string key)
Returns
System.Collections.Generic.List<NavItem>
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | key |
Nav(HtmlHelper)
View Source
public static HtmlString Nav(this HtmlHelper html)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
Nav(HtmlHelper, NavOptions)
View Source
public static HtmlString Nav(this HtmlHelper html, NavOptions options)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
ServiceStack.NavOptions | options |
Nav(HtmlHelper, List<NavItem>)
View Source
public static HtmlString Nav(this HtmlHelper html, List<NavItem> navItems)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.List<NavItem> | navItems |
Nav(HtmlHelper, List<NavItem>, NavOptions)
View Source
public static HtmlString Nav(this HtmlHelper html, List<NavItem> navItems, NavOptions options)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.List<NavItem> | navItems |
ServiceStack.NavOptions | options |
Navbar(HtmlHelper)
View Source
public static HtmlString Navbar(this HtmlHelper html)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
Navbar(HtmlHelper, NavOptions)
View Source
public static HtmlString Navbar(this HtmlHelper html, NavOptions options)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
ServiceStack.NavOptions | options |
Navbar(HtmlHelper, List<NavItem>)
View Source
public static HtmlString Navbar(this HtmlHelper html, List<NavItem> navItems)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.List<NavItem> | navItems |
Navbar(HtmlHelper, List<NavItem>, NavOptions)
View Source
public static HtmlString Navbar(this HtmlHelper html, List<NavItem> navItems, NavOptions options)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.List<NavItem> | navItems |
ServiceStack.NavOptions | options |
NavLink(HtmlHelper, NavItem)
View Source
public static HtmlString NavLink(this HtmlHelper html, NavItem navItem)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
NavItem | navItem |
NavLink(HtmlHelper, NavItem, NavOptions)
View Source
public static HtmlString NavLink(this HtmlHelper html, NavItem navItem, NavOptions options)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
NavItem | navItem |
ServiceStack.NavOptions | options |
NavButtonGroup(HtmlHelper)
View Source
public static HtmlString NavButtonGroup(this HtmlHelper html)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
NavButtonGroup(HtmlHelper, NavOptions)
View Source
public static HtmlString NavButtonGroup(this HtmlHelper html, NavOptions options)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
ServiceStack.NavOptions | options |
NavButtonGroup(HtmlHelper, List<NavItem>)
View Source
public static HtmlString NavButtonGroup(this HtmlHelper html, List<NavItem> navItems)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.List<NavItem> | navItems |
NavButtonGroup(HtmlHelper, List<NavItem>, NavOptions)
View Source
public static HtmlString NavButtonGroup(this HtmlHelper html, List<NavItem> navItems, NavOptions options)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.Collections.Generic.List<NavItem> | navItems |
ServiceStack.NavOptions | options |
CssIncludes(HtmlHelper, String[])
View Source
public static HtmlString CssIncludes(this HtmlHelper html, params string[] cssFiles)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String[] | cssFiles |
JsIncludes(HtmlHelper, String[])
View Source
public static HtmlString JsIncludes(this HtmlHelper html, params string[] jsFiles)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String[] | jsFiles |
SvgImage(HtmlHelper, String)
View Source
public static HtmlString SvgImage(this HtmlHelper html, string name)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
SvgImage(HtmlHelper, String, String)
View Source
public static HtmlString SvgImage(this HtmlHelper html, string name, string fillColor)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
System.String | fillColor |
SvgDataUri(HtmlHelper, String)
View Source
public static HtmlString SvgDataUri(this HtmlHelper html, string name)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
SvgDataUri(HtmlHelper, String, String)
View Source
public static HtmlString SvgDataUri(this HtmlHelper html, string name, string fillColor)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
System.String | fillColor |
SvgBackgroundImageCss(HtmlHelper, String)
View Source
public static HtmlString SvgBackgroundImageCss(this HtmlHelper html, string name)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
SvgBackgroundImageCss(HtmlHelper, String, String)
View Source
public static HtmlString SvgBackgroundImageCss(this HtmlHelper html, string name, string fillColor)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | name |
System.String | fillColor |
SvgInBackgroundImageCss(HtmlHelper, String)
View Source
public static HtmlString SvgInBackgroundImageCss(this HtmlHelper html, string svg)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | svg |
SvgFill(HtmlHelper, String, String)
View Source
public static HtmlString SvgFill(this HtmlHelper html, string svg, string color)
Returns
System.Web.HtmlString
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |
System.String | svg |
System.String | color |
SvgBaseUrl(HtmlHelper)
View Source
public static string SvgBaseUrl(this HtmlHelper html)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.HtmlHelper | html |