-
Notifications
You must be signed in to change notification settings - Fork 3
Helpers
To use a helper, make sure the namespace BIA.Net.Helpers is added in the web.config file:
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
...
<add namespace="Safran.TaktTime.Helpers" />
...
</namespaces>
</pages>
</system.web.webPages.razor>Once this is done, you only have to call the helper you want from a view with razor:
@Html.T_LabelFor(model => model.Item, htmlAttributes: new { @class = "control-label col-md-2" })The framework's helpers are distributed into several categories :
-
HtmlHelpersInput :
-
CheckBoxListFor : Helper that displays a list of checkboxes from an IEnumerable that allows multiselection

-
MultiselectFor : The usage is exactly the same as CheckBoxListFor except that the helper design is different and that there are two more parameters.
searchAppearOver is the integer that indicates the number of items alowed in the list before the search functionality is used. It is 8 by default.
multiselectParameter is a string used to add some functions to the helper. For more informations about these functions, check the "Configuration Options" part here. It is "maxHeight: 200, buttonWidth: '100%'" by default.

-
-
HtmlHelpersScript :
- RenderScript : Helper that renders in the view the scripts that are placed in the htmlHelper ViewContext in order of priority.
-
HtmlHelpersTranslate :
-
Translate : Helper that translates a string from the TextResources or the AppliResources.
-
TranslateAndPlurialize : Helper that translates a string before pluralizing it. The plural expression of the string has to be in the TextResources or in the AppliResources.
-
T_LabelFor : Helper that translates the property name of an entity and puts it in a label. The entity name to translate has to be in the TextResources or in the AppliResources.
-
T_DisplayNameFor : Helper that translates the property name of an entity. The entity name to translate has to be in the TextResources or in the AppliResources.
-
BIA.Net