Is it possible to put the declarative html helpers in an assembly different than the application web project?
Currently, the only place where I know I can put my declarative html helpers is in the folder 'App_Code' of my application web project.
After a couple of months of development, I now have a lot of these declarative html helpers and the only one solution I have to shared it among all my projects is with a the very bad practice of 'Copy Paste Driven Development'.
Any other ways?
P.S.
Just not to be confused by the definition of what is declarative html helpers, here is a code sample to makes the difference compared to c# extensions that extend the System.Web.Mvc.Html type:
@using Microsoft.Web.Mvc.Html
@helper YesNoRadioButton(System.Web.Mvc.HtmlHelper html, string name, bool value, bool disable = false)
{
@html.RadioButton(name, true, value, id: name.Replace(".", "_") + "_Yes", disabled: disable) @:Oui
@html.RadioButton(name, false, !value, id: name.Replace(".", "_") + "_No", disabled: disable) @:Non
}
@helper YesNoRadioButton(System.Web.Mvc.HtmlHelper html, string name, bool? value, bool disable = false)
{
@html.RadioButton(name, true, value.HasValue && value.Value, id: name.Replace(".", "_") + "_Yes", disabled: disable) @:Oui
@html.RadioButton(name, false, value.HasValue && !value.Value, id: name.Replace(".", "_") + "_No", disabled: disable) @:Non
}