c# - use external htmlhelper extensions with ServiceStack -
is possible use system.web.mvc.htmlhelper extensions servicestack.razor implementation.
i'm trying use ext.net extensions, others extensions devexpress, kendo have same problem.
maybe it's possible create instance of system.web.mvc.htmlhelper correct data , pass instance other extensions , return result servicestack.html.htmlhelper instance.
thanks
servicestack includes own port of mvc htmlhelper extensions, these bind servicestack.html
htmlhelper , not mvc's htmlhelper distinct, separate concrete implementation.
this results in libraries binding mvc concrete htmlhelpers not interchangeable libraries binding servicestack's htmlhelper.
this not ideal scenario , shows limitation of binding concrete implementations in statically typed languages. solution have adapters classes provided ext.net, devexpress, etc binds servicestack's concrete htmlhelpers in addition mvc htmlhelper.
the ideal solution would've been asp.net framework include empty ihtmlhelper
marker interface (avoiding dependency on mvc), have concrete htmlhelpers implement same interface , providing htmlhelper extensions bind ihtmlhelper
interface instead.
Comments
Post a Comment