I\'m not even sure if this is possible, but I thought I would check to see if there is any way to make this easier.
First, I have some repeated markup in my site that lo
There's also the other way, without disposable trick, which also requires a little less work, great for little helpers.
@helper MyHelper(string title, Func
Usage of this helper looks like this:
@MyHelper("This is my Title",
@Here is my custom markup
)
Or with multiple lines:
@MyHelper("This is my Title",
@
More than one line
Of markup
)
Telerik MVC controls used this trick for example to let you add your javascript code at the document load.
Here's also a nice example. There's also some information here.