Class GadgetHtmlHelperExtensions
Extension methods for System.Web.Mvc.HtmlHelper. Used by the gadget framework.
Inheritance
Inherited Members
Namespace: EPiServer.Shell.Web.Mvc.Html
Assembly: EPiServer.Shell.dll
Version: 8.11.0Syntax
public static class GadgetHtmlHelperExtensions
Methods
AcceptButton(HtmlHelper)
Returns markup for save button of a gadget.
Declaration
public static string AcceptButton(this HtmlHelper helper)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
Returns
Type | Description |
---|---|
System.String |
AcceptButton(HtmlHelper, Object)
Returns markup for save button of a gadget.
Declaration
public static string AcceptButton(this HtmlHelper helper, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.Object | htmlAttributes | Any attributes that should be added to the input tag. |
Returns
Type | Description |
---|---|
System.String |
AcceptButton(HtmlHelper, Object, LocalizationService)
Returns markup for save button of a gadget.
Declaration
public static string AcceptButton(this HtmlHelper helper, object htmlAttributes, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.Object | htmlAttributes | Any attributes that should be added to the input tag. |
LocalizationService | localizationService | The service used for localization. |
Returns
Type | Description |
---|---|
System.String |
Remarks
If localizationService
is null
,
the static instance Current will be used.
BeginGadgetForm(HtmlHelper, String)
Renders a form tag with the class attribute "epi-gadgetform".
Declaration
public static MvcForm BeginGadgetForm(this HtmlHelper helper, string actionName)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HtmlHelper to attach this method to. |
System.String | actionName | Name of the action the form should post to. |
Returns
Type | Description |
---|---|
System.Web.Mvc.Html.MvcForm |
BeginGadgetForm(HtmlHelper, String, Object)
Renders a form tag with the class attribute "epi-gadgetform".
Declaration
public static MvcForm BeginGadgetForm(this HtmlHelper helper, string actionName, object routeValues)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HtmlHelper to attach this method to. |
System.String | actionName | Name of the action the form should post to. |
System.Object | routeValues | Any extra route values that should be sent in the form POST |
Returns
Type | Description |
---|---|
System.Web.Mvc.Html.MvcForm |
CancelButton(HtmlHelper)
Returns markup for cancel button of a gadget.
Declaration
public static string CancelButton(this HtmlHelper helper)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
Returns
Type | Description |
---|---|
System.String |
CancelButton(HtmlHelper, Object)
Returns markup for cancel button of a gadget.
Declaration
public static string CancelButton(this HtmlHelper helper, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.Object | htmlAttributes | The attributes that will be added to the input tag. |
Returns
Type | Description |
---|---|
System.String | The html for a cancel button. |
CancelButton(HtmlHelper, Object, Object)
Returns markup for cancel button of a gadget.
Declaration
public static string CancelButton(this HtmlHelper helper, object htmlAttributes, object routeValues)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.Object | htmlAttributes | The attributes that will be added to the input tag. |
System.Object | routeValues | Extra route paramaters. |
Returns
Type | Description |
---|---|
System.String | The html for a cancel button. |
CancelButton(HtmlHelper, Object, Object, LocalizationService)
Returns markup for cancel button of a gadget.
Declaration
public static string CancelButton(this HtmlHelper helper, object htmlAttributes, object routeValues, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.Object | htmlAttributes | The attributes that will be added to the input tag. |
System.Object | routeValues | Extra route paramaters. |
LocalizationService | localizationService | The service used for localization. |
Returns
Type | Description |
---|---|
System.String | The html for a cancel button. |
Remarks
If localizationService
is null
,
the static instance Current will be used.
ClearGadgetFeedback(HtmlHelper)
Clears the gadget feedback.
Declaration
public static string ClearGadgetFeedback(this HtmlHelper helper)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The helper. |
Returns
Type | Description |
---|---|
System.String |
GetGadgetId(HtmlHelper)
Gets the gadget id from the querystring or Route values.
Declaration
public static Guid GetGadgetId(this HtmlHelper helper)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The Html helper. |
Returns
Type | Description |
---|---|
System.Guid |
SetGadgetFeedback(HtmlHelper, String)
Sets the gadget feedback.
Declaration
public static string SetGadgetFeedback(this HtmlHelper helper, string feedbackMessage)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The helper. |
System.String | feedbackMessage | The feedback message. |
Returns
Type | Description |
---|---|
System.String |
SetGadgetFeedback(HtmlHelper, String, Boolean, TimeSpan, Boolean)
Sets the gadget feedback.
Declaration
public static string SetGadgetFeedback(this HtmlHelper helper, string feedbackMessage, bool showAjaxLoader, TimeSpan hideAfter, bool fadeout)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The helper. |
System.String | feedbackMessage | The feedback message. |
System.Boolean | showAjaxLoader | if set to |
System.TimeSpan | hideAfter | The hide after. |
System.Boolean | fadeout | if set to |
Returns
Type | Description |
---|---|
System.String |
ViewInputButton(HtmlHelper, String, String, String, Object)
Returns markup for Input Button loading a gadget view through it's action.
Declaration
public static string ViewInputButton(this HtmlHelper helper, string text, string title, string actionName, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.String | text | The text of the link |
System.String | title | The title for the link. |
System.String | actionName | The name of the action on the executing controller |
System.Object | htmlAttributes | Any attributes that should be added to the a tag. |
Returns
Type | Description |
---|---|
System.String |
ViewInputButton(HtmlHelper, String, String, String, String, Object)
Returns markup for loading a gadget view through it's action.
Declaration
public static string ViewInputButton(this HtmlHelper helper, string text, string title, string actionName, string cssClass, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.String | text | The text of the link |
System.String | title | The title for the link. |
System.String | actionName | The name of the action on the executing controller |
System.String | cssClass | Any extra css class that should be added to the input. |
System.Object | htmlAttributes | Any attributes that should be added to the a tag. |
Returns
Type | Description |
---|---|
System.String |
ViewInputButton(HtmlHelper, String, String, String, String, Object, Object)
Returns markup for loading a gadget view through it's action.
Declaration
public static string ViewInputButton(this HtmlHelper helper, string text, string title, string actionName, string cssClass, object htmlAttributes, object routeValues)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.String | text | The text of the link |
System.String | title | The title for the link. |
System.String | actionName | The name of the action on the executing controller |
System.String | cssClass | Any extra css class that should be added to the input. |
System.Object | htmlAttributes | Any attributes that should be added to the a tag. |
System.Object | routeValues | Any extra route parameters to send to the controller |
Returns
Type | Description |
---|---|
System.String |
ViewLink(HtmlHelper, String, String, String, Object)
Returns markup for loading a gadget view through it's action.
Declaration
public static string ViewLink(this HtmlHelper helper, string text, string title, string actionName, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.String | text | The text of the link |
System.String | title | The title for the link. |
System.String | actionName | The name of the action on the executing controller |
System.Object | htmlAttributes | Any attributes that should be added to the a tag. |
Returns
Type | Description |
---|---|
System.String |
ViewLink(HtmlHelper, String, String, String, String, Object)
Returns markup for loading a gadget view through it's action.
Declaration
public static string ViewLink(this HtmlHelper helper, string text, string title, string actionName, string cssClass, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.String | text | The text of the link |
System.String | title | The title for the link. |
System.String | actionName | The name of the action on the executing controller |
System.String | cssClass | Any extra css class that should be added to the link. |
System.Object | htmlAttributes | Any attributes that should be added to the a tag. |
Returns
Type | Description |
---|---|
System.String |
ViewLink(HtmlHelper, String, String, String, String, Object, Object)
Returns markup for loading a gadget view through it's action.
Declaration
public static string ViewLink(this HtmlHelper helper, string text, string title, string actionName, string cssClass, object htmlAttributes, object routeValues)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.String | text | The text of the link |
System.String | title | The title for the link. |
System.String | actionName | The name of the action on the executing controller |
System.String | cssClass | Any extra css class that should be added to the link. |
System.Object | htmlAttributes | Any attributes that should be added to the a tag. |
System.Object | routeValues | Any extra route parameters to send to the controller |
Returns
Type | Description |
---|---|
System.String |
ViewLinkButton(HtmlHelper, String, String, String, Object)
Returns markup for a Link Button loading a gadget view through it's action.
Declaration
public static string ViewLinkButton(this HtmlHelper helper, string text, string title, string actionName, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.String | text | The text of the link |
System.String | title | The title for the link. |
System.String | actionName | The name of the action on the executing controller |
System.Object | htmlAttributes | Any attributes that should be added to the a tag. |
Returns
Type | Description |
---|---|
System.String |
ViewLinkButton(HtmlHelper, String, String, String, String, Object)
Returns markup for a Link Button loading a gadget view through it's action.
Declaration
public static string ViewLinkButton(this HtmlHelper helper, string text, string title, string actionName, string cssClass, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.String | text | The text of the link |
System.String | title | The title for the link. |
System.String | actionName | The name of the action on the executing controller |
System.String | cssClass | Any extra css class that should be added to the link. |
System.Object | htmlAttributes | Any attributes that should be added to the a tag. |
Returns
Type | Description |
---|---|
System.String |
ViewLinkButton(HtmlHelper, String, String, String, String, Object, Object)
Returns markup for a Link Button loading a gadget view through it's action.
Declaration
public static string ViewLinkButton(this HtmlHelper helper, string text, string title, string actionName, string cssClass, object htmlAttributes, object routeValues)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | helper | The HTML helper. |
System.String | text | The text of the link |
System.String | title | The title for the link. |
System.String | actionName | The name of the action on the executing controller |
System.String | cssClass | Any extra css class that should be added to the link. |
System.Object | htmlAttributes | Any attributes that should be added to the a tag. |
System.Object | routeValues | Any extra route parameters to send to the controller |
Returns
Type | Description |
---|---|
System.String |