I have this helper in my view:
<%= Html.StandardOverlayCreateButton<EmployeeController>()%>
It creates the following HTML:
<a rel="#overlay" href="/Employee/Create">
<button type="button">
Create</button>
</a>
I do not like this anyway.
Any suggestions 🙂 ?
I also askmyself when to create html helper extension and when just write the pure HTML code?
In this case I think the helper is warranted as the amount of HTML “code” you’re replacing is significant and conceptually a single entity, i.e., a styled “button”. You can get access to the controller, however, in the view by using the ViewContext property on the ViewPage.