Reputation: 93327
In my views I verry often have to write
<%=Model.T9n.TranslateById("someId");%>
Is there some way to make this more compact/readable. A custom tag maybe?
<asp:T9n>someId</asp:T9n>
or better
<t9n: someId />
Note
There are several (business) reasons why I can't use the default T9n tools in visual studio so that's why I've rolled my own.
Upvotes: 1
Views: 372
Reputation: 15890
I don't know anything about creating custom tags in MVC...
You could create your own custom HtmlHelper extension method. E.g.
<%=Html.T9n("someId");%>
HTHs, Charles
Upvotes: 1
Reputation: 18491
Yes you can create a custom control and get something like <prefix:t9n translationID="someID" runat="server"/>
Just Google for web custom control
and you'll get tons of hits.
Upvotes: 1